IOPaint/lama_cleaner/app/src/components/Settings/SettingIcon.tsx

27 lines
602 B
TypeScript
Raw Normal View History

2022-04-12 14:58:57 +02:00
import React from 'react'
import { useRecoilState } from 'recoil'
2023-01-27 13:12:04 +01:00
import { Cog6ToothIcon } from '@heroicons/react/24/outline'
2022-04-12 14:58:57 +02:00
import { settingState } from '../../store/Atoms'
import Button from '../shared/Button'
const SettingIcon = () => {
const [setting, setSettingState] = useRecoilState(settingState)
const onClick = () => {
setSettingState({ ...setting, show: !setting.show })
}
return (
<div>
<Button
onClick={onClick}
toolTip="Settings"
2022-04-12 14:58:57 +02:00
style={{ border: 0 }}
2023-01-27 13:12:04 +01:00
icon={<Cog6ToothIcon />}
2022-04-12 14:58:57 +02:00
/>
</div>
)
}
export default SettingIcon