Spaces:
Configuration error
Configuration error
File size: 773 Bytes
74aacd5 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 |
import React from 'react'
import { useRecoilState } from 'recoil'
import { settingState } from '../../store/Atoms'
import { Switch, SwitchThumb } from '../shared/Switch'
import SettingBlock from './SettingBlock'
const DownloadMaskSettingBlock: React.FC = () => {
const [setting, setSettingState] = useRecoilState(settingState)
const onCheckChange = (checked: boolean) => {
setSettingState(old => {
return { ...old, downloadMask: checked }
})
}
return (
<SettingBlock
title="Download Mask"
desc="Download inpainting result and mask"
input={
<Switch checked={setting.downloadMask} onCheckedChange={onCheckChange}>
<SwitchThumb />
</Switch>
}
/>
)
}
export default DownloadMaskSettingBlock
|