@coveord/plasma-mantine
Version:
A Plasma flavoured Mantine theme
19 lines (18 loc) • 736 B
JavaScript
import { jsx as _jsx } from "react/jsx-runtime";
import { createPolymorphicComponent } from '@mantine/core';
import { forwardRef } from 'react';
import { Button } from '../button';
import { useInlineConfirm } from './InlineConfirmContext';
export const InlineConfirmTarget = createPolymorphicComponent(/*#__PURE__*/ forwardRef(({ onClick, inlineConfirmId, component: Component = Button, ...others }, ref)=>{
const { setConfirmingId } = useInlineConfirm();
const handleOnClick = (e)=>{
setConfirmingId(inlineConfirmId);
onClick?.(e);
};
return /*#__PURE__*/ _jsx(Component, {
ref: ref,
onClick: handleOnClick,
...others
});
}));
//# sourceMappingURL=InlineConfirmTarget.js.map