mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-08 08:53:51 +00:00
20 lines
508 B
React
20 lines
508 B
React
import { IconButton } from '@chakra-ui/button';
|
|
import { FiSun } from 'react-icons/fi';
|
|
|
|
export default function VisibleIconBtn(props) {
|
|
const { actionHandler, active, ...rest } = props;
|
|
return (
|
|
<IconButton
|
|
size={props.size || 'xs'}
|
|
icon={<FiSun />}
|
|
colorScheme='blue'
|
|
variant={active ? 'solid' : 'outline'}
|
|
onClick={() =>
|
|
actionHandler('update', { field: 'isPublic', value: !active })
|
|
}
|
|
_focus={{ boxShadow: 'none' }}
|
|
{...rest}
|
|
/>
|
|
);
|
|
}
|