mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
3b9426eb72
Implement `dnd-kit` for image drag and drop - vastly simplifies logic bc we can drag and drop non-serializable data (like an `ImageDTO`) - also much prettier - also will fix conflicts with file upload via OS drag and drop, bc `dnd-kit` does not use native HTML drag and drop API - Implemented for Init image, controlnet, and node editor so far More progress on the ControlNet UI
26 lines
590 B
TypeScript
26 lines
590 B
TypeScript
import {
|
|
Checkbox,
|
|
CheckboxProps,
|
|
FormControl,
|
|
FormControlProps,
|
|
FormLabel,
|
|
} from '@chakra-ui/react';
|
|
import { memo, ReactNode } from 'react';
|
|
|
|
type IAIFullCheckboxProps = CheckboxProps & {
|
|
label: string | ReactNode;
|
|
formControlProps?: FormControlProps;
|
|
};
|
|
|
|
const IAIFullCheckbox = (props: IAIFullCheckboxProps) => {
|
|
const { label, formControlProps, ...rest } = props;
|
|
return (
|
|
<FormControl {...formControlProps}>
|
|
<FormLabel>{label}</FormLabel>
|
|
<Checkbox colorScheme="accent" {...rest} />
|
|
</FormControl>
|
|
);
|
|
};
|
|
|
|
export default memo(IAIFullCheckbox);
|