chore(prettier): full repo linting and code reformatting once and for all (#3627)
This commit is contained in:
1 parent
01500a2d4c
commit
9045ddaedc
656 files changed
+21737
-20628
No files matched your search
@@ -19,14 +19,7 @@ const CheckBox: React.FC<{
|
||||
label: string;
|
||||
labelClassName?: string;
|
||||
labelVariant?: string;
|
||||
}> = ({
|
||||
checked,
|
||||
onChange,
|
||||
label,
|
||||
labelClassName,
|
||||
labelVariant = 'body',
|
||||
className,
|
||||
}) => {
|
||||
}> = ({ checked, onChange, label, labelClassName, labelVariant = 'body', className }) => {
|
||||
const [isChecked, setIsChecked] = useState(checked);
|
||||
|
||||
const handleClick = useCallback(() => {
|
||||
@@ -36,16 +29,10 @@ const CheckBox: React.FC<{
|
||||
|
||||
return (
|
||||
<div
|
||||
className={`flex items-center cursor-pointer space-x-1 ${
|
||||
className ? className : ''
|
||||
}`}
|
||||
className={`flex cursor-pointer items-center space-x-1 ${className ? className : ''}`}
|
||||
onClick={handleClick}
|
||||
>
|
||||
{isChecked ? (
|
||||
<Icon name="checkbox-checked" />
|
||||
) : (
|
||||
<Icon name="checkbox-unchecked" />
|
||||
)}
|
||||
{isChecked ? <Icon name="checkbox-checked" /> : <Icon name="checkbox-unchecked" />}
|
||||
|
||||
<Typography
|
||||
variant={labelVariant ?? 'subtitle'}
|
||||
|
||||
@@ -6,11 +6,17 @@ export const argTypes = {
|
||||
title: 'Components/CheckBox',
|
||||
};
|
||||
|
||||
<Meta title="Components/CheckBox" component={CheckBox} />
|
||||
<Meta
|
||||
title="Components/CheckBox"
|
||||
component={CheckBox}
|
||||
/>
|
||||
|
||||
export const CheckBoxTemplate = args => <CheckBox {...args} />
|
||||
export const CheckBoxTemplate = args => <CheckBox {...args} />;
|
||||
|
||||
<Heading title="CheckBox" componentRelativePath="CheckBox/CheckBox.tsx" />
|
||||
<Heading
|
||||
title="CheckBox"
|
||||
componentRelativePath="CheckBox/CheckBox.tsx"
|
||||
/>
|
||||
|
||||
- [Overview](#overview)
|
||||
- [Props](#props)
|
||||
@@ -26,8 +32,8 @@ CheckBox is a component that allows you to use as a boolean value
|
||||
args={{
|
||||
checked: false,
|
||||
onChange: () => console.log('on change callback'),
|
||||
label: "checkBoxLabel",
|
||||
labelClassName: "text-black text-sm",
|
||||
label: 'checkBoxLabel',
|
||||
labelClassName: 'text-black text-sm',
|
||||
}}
|
||||
>
|
||||
{CheckBoxTemplate.bind({})}
|
||||
|
||||
Reference in new issue
Block a user