mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-16 04:43:35 +00:00
6ac963684d
* chore: upgrade minor versions * chore: upgrade cypress * chore: upgrade fe dependencies * update readme * update osx images * update readme * upgrade dependencies * upgrade test dependency * feat: add option to input autofill * feat: autofill to the left * chore: update docs * chore: cleanup ci * version bump * style: prevent zero height bar * fix: prevent loosing menu * ux: improve input, no spellcheck or autocomplete * small ux improvements in cuesheets * feat 111/increase maximum number of events * fix: optimistic delete issue with filter * refact: pincode workflow * chore: add versioning to packages
28 lines
691 B
React
28 lines
691 B
React
import React from 'react';
|
|
import { IconButton } from '@chakra-ui/button';
|
|
import { Tooltip } from '@chakra-ui/tooltip';
|
|
import PropTypes from 'prop-types';
|
|
|
|
export default function TooltipActionBtn(props) {
|
|
const { clickHandler, icon, color, size='xs', tooltip, ...rest } = props;
|
|
return (
|
|
<Tooltip label={tooltip}>
|
|
<IconButton
|
|
aria-label={tooltip}
|
|
size={size}
|
|
icon={icon}
|
|
onClick={clickHandler}
|
|
{...rest}
|
|
/>
|
|
</Tooltip>
|
|
);
|
|
}
|
|
|
|
TooltipActionBtn.propTypes = {
|
|
clickHandler: PropTypes.func,
|
|
icon: PropTypes.element,
|
|
color: PropTypes.string,
|
|
size: PropTypes.oneOf(['xs', 'sm', 'md', 'lg']),
|
|
tooltip: PropTypes.string
|
|
}
|