2022-10-27 04:24:00 +00:00
|
|
|
import { Checkbox, CheckboxProps } from '@chakra-ui/react';
|
2022-12-24 20:28:59 +00:00
|
|
|
import type { ReactNode } from 'react';
|
2022-10-27 04:24:00 +00:00
|
|
|
|
|
|
|
type IAICheckboxProps = CheckboxProps & {
|
2022-12-24 20:28:59 +00:00
|
|
|
label: string | ReactNode;
|
2023-03-06 01:29:39 +00:00
|
|
|
styleClass?: string;
|
2022-10-27 04:24:00 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
const IAICheckbox = (props: IAICheckboxProps) => {
|
2023-03-06 01:29:39 +00:00
|
|
|
const { label, styleClass, ...rest } = props;
|
2022-10-27 04:24:00 +00:00
|
|
|
return (
|
2023-03-06 01:29:39 +00:00
|
|
|
<Checkbox className={`invokeai__checkbox ${styleClass}`} {...rest}>
|
2022-10-27 04:24:00 +00:00
|
|
|
{label}
|
|
|
|
</Checkbox>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
|
|
|
|
export default IAICheckbox;
|