File size: 602 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
import React from 'react'
import { useRecoilState } from 'recoil'
import { Cog6ToothIcon } from '@heroicons/react/24/outline'
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"
        style={{ border: 0 }}
        icon={<Cog6ToothIcon />}
      />
    </div>
  )
}

export default SettingIcon