UNPKG

@coveord/plasma-mantine

Version:

A Plasma flavoured Mantine theme

26 lines (25 loc) 1.1 kB
import { jsx as _jsx } from "react/jsx-runtime"; import { ActionIcon as MantineActionIcon, polymorphicFactory } from '@mantine/core'; import { useClickWithLoading } from '../../hooks/useClickWithLoading'; import { ButtonWithDisabledTooltip } from '../button/ButtonWithDisabledTooltip'; export const ActionIcon = polymorphicFactory(({ disabledTooltip, disabled, disabledTooltipProps, loading, onClick, ...others }, ref)=>{ const { isLoading, handleClick } = useClickWithLoading(onClick); return /*#__PURE__*/ _jsx(ButtonWithDisabledTooltip, { disabled: disabled, disabledTooltip: disabledTooltip, disabledTooltipProps: disabledTooltipProps, fullWidth: others.fullWidth, children: /*#__PURE__*/ _jsx(MantineActionIcon, { loaderProps: { type: 'oval' }, ref: ref, loading: isLoading || loading, onClick: handleClick, disabled: disabled, ...others }) }); }); ActionIcon.Group = MantineActionIcon.Group; //# sourceMappingURL=ActionIcon.js.map