mirror of
https://github.com/invoke-ai/InvokeAI.git
synced 2026-04-23 03:00:31 -04:00
23 lines
512 B
TypeScript
23 lines
512 B
TypeScript
import { useAppDispatch } from '../../../app/store';
|
|
import IAISwitch from '../../../common/components/IAISwitch';
|
|
|
|
export default function SettingsModalItem({
|
|
settingTitle,
|
|
isChecked,
|
|
dispatcher,
|
|
}: {
|
|
settingTitle: string;
|
|
isChecked: boolean;
|
|
dispatcher: any;
|
|
}) {
|
|
const dispatch = useAppDispatch();
|
|
return (
|
|
<IAISwitch
|
|
styleClass="settings-modal-item"
|
|
label={settingTitle}
|
|
isChecked={isChecked}
|
|
onChange={(e) => dispatch(dispatcher(e.target.checked))}
|
|
/>
|
|
);
|
|
}
|