mirror of https://github.com/buster-so/buster.git
21 lines
709 B
TypeScript
21 lines
709 B
TypeScript
import React from 'react';
|
|
import { LabelAndInput } from '../Common';
|
|
import { Switch } from '@/components/ui/switch';
|
|
import { WarningIcon } from '../Common/WarningIcon';
|
|
|
|
export const EditShowDataLabels: React.FC<{
|
|
showDataLabels: boolean;
|
|
rowCount: number;
|
|
onUpdateDataLabel: (v: boolean) => void;
|
|
}> = React.memo(({ showDataLabels, rowCount, onUpdateDataLabel }) => {
|
|
return (
|
|
<LabelAndInput label={'Data labels'}>
|
|
<div className="flex justify-end gap-x-2">
|
|
<WarningIcon rowCount={rowCount} />
|
|
<Switch defaultChecked={showDataLabels} onCheckedChange={onUpdateDataLabel} />
|
|
</div>
|
|
</LabelAndInput>
|
|
);
|
|
});
|
|
EditShowDataLabels.displayName = 'EditShowDataLabels';
|