mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-10 09:53:48 +00:00
b7e758bf24
* chore: add typescript and dependencies * refactor: remove react imports * refactor: fix entrypoint * chore: upgrade chakra and deps * chore: configure eslint
29 lines
780 B
React
29 lines
780 B
React
import { IconButton } from '@chakra-ui/button';
|
|
import { Tooltip } from '@chakra-ui/tooltip';
|
|
import { IoStop } from '@react-icons/all-files/io5/IoStop';
|
|
import PropTypes from 'prop-types';
|
|
|
|
import { tooltipDelayMid } from '../../../ontimeConfig';
|
|
|
|
export default function UnloadIconBtn(props) {
|
|
const { clickHandler, disabled, ...rest } = props;
|
|
return (
|
|
<Tooltip label='Unload event' openDelay={tooltipDelayMid} shouldWrapChildren={disabled}>
|
|
<IconButton
|
|
icon={<IoStop size='22px' />}
|
|
colorScheme='red'
|
|
variant='outline'
|
|
onClick={clickHandler}
|
|
width={90}
|
|
disabled={disabled}
|
|
{...rest}
|
|
/>
|
|
</Tooltip>
|
|
);
|
|
}
|
|
|
|
UnloadIconBtn.propTypes = {
|
|
clickHandler: PropTypes.func,
|
|
disabled: PropTypes.bool,
|
|
};
|