InvokeAI/invokeai/frontend/web/src/common/components/IAICheckbox.tsx

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

19 lines
448 B
TypeScript
Raw Normal View History

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;
styleClass?: string;
2022-10-27 04:24:00 +00:00
};
const IAICheckbox = (props: IAICheckboxProps) => {
const { label, styleClass, ...rest } = props;
2022-10-27 04:24:00 +00:00
return (
<Checkbox className={`invokeai__checkbox ${styleClass}`} {...rest}>
2022-10-27 04:24:00 +00:00
{label}
</Checkbox>
);
};
export default IAICheckbox;