mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-10 01:43:43 +00:00
856f9d308a
- remove unused code in collapse atom - stop text input from creating new line - clean overflow - restyle lock button - restyle action buttons - 10 second default on paginator - Pip shows running timer
56 lines
1.4 KiB
React
56 lines
1.4 KiB
React
import { Menu, MenuButton, MenuItem, MenuList } from '@chakra-ui/menu';
|
|
import { IconButton } from '@chakra-ui/button';
|
|
import {
|
|
FiTrash2,
|
|
FiZap,
|
|
FiPlus,
|
|
FiClock,
|
|
FiMinusCircle,
|
|
} from 'react-icons/fi';
|
|
import { Divider } from '@chakra-ui/layout';
|
|
|
|
export default function MenuActionButtons(props) {
|
|
const { actionHandler } = props;
|
|
const menuStyle = {
|
|
color: '#000000',
|
|
backgroundColor: 'rgba(255,255,255,1)',
|
|
};
|
|
|
|
return (
|
|
<Menu isLazy lazyBehavior='unmount'>
|
|
<MenuButton
|
|
as={IconButton}
|
|
aria-label='Options'
|
|
size={props.size || 'xs'}
|
|
icon={<FiZap />}
|
|
_expanded={{ bg: 'orange.300', color: 'white' }}
|
|
_focus={{ boxShadow: 'none' }}
|
|
backgroundColor={'orange.200'}
|
|
color={'orange.500'}
|
|
/>
|
|
<MenuList style={menuStyle}>
|
|
<MenuItem icon={<FiPlus />} onClick={() => actionHandler('event')}>
|
|
Event first
|
|
</MenuItem>
|
|
<MenuItem icon={<FiClock />} onClick={() => actionHandler('delay')}>
|
|
Delay first
|
|
</MenuItem>
|
|
<MenuItem
|
|
icon={<FiMinusCircle />}
|
|
onClick={() => actionHandler('block')}
|
|
>
|
|
Block first
|
|
</MenuItem>
|
|
<Divider />
|
|
<MenuItem
|
|
icon={<FiTrash2 />}
|
|
onClick={() => actionHandler('deleteall')}
|
|
color='red.500'
|
|
>
|
|
Delete All
|
|
</MenuItem>
|
|
</MenuList>
|
|
</Menu>
|
|
);
|
|
}
|