mirror of
https://github.com/SigNoz/signoz.git
synced 2025-12-28 23:56:13 +00:00
* chore: added jsx-runtime plugin in eslint tsconfig Signed-off-by: GermaVinsmoke <vaibhav1180@gmail.com> * chore: updated react imports Signed-off-by: GermaVinsmoke <vaibhav1180@gmail.com> * chore: renamed redux dispatch Signed-off-by: GermaVinsmoke <vaibhav1180@gmail.com> * fix: build is fixed --------- Signed-off-by: GermaVinsmoke <vaibhav1180@gmail.com> Co-authored-by: Palash Gupta <palashgdev@gmail.com>
25 lines
544 B
TypeScript
25 lines
544 B
TypeScript
import { QueryChipContainer, QueryChipItem } from './styles';
|
|
import { ILabelRecord } from './types';
|
|
|
|
interface QueryChipProps {
|
|
queryData: ILabelRecord;
|
|
onRemove: (id: string) => void;
|
|
}
|
|
|
|
export default function QueryChip({
|
|
queryData,
|
|
onRemove,
|
|
}: QueryChipProps): JSX.Element {
|
|
const { key, value } = queryData;
|
|
return (
|
|
<QueryChipContainer>
|
|
<QueryChipItem
|
|
closable={key !== 'severity' && key !== 'description'}
|
|
onClose={(): void => onRemove(key)}
|
|
>
|
|
{key}: {value}
|
|
</QueryChipItem>
|
|
</QueryChipContainer>
|
|
);
|
|
}
|