UNPKG

@workday/canvas-kit-react

Version:

The parent module that contains all Workday Canvas Kit React components

19 lines (18 loc) 1.07 kB
import { jsx as _jsx } from "react/jsx-runtime"; import { xIcon } from '@workday/canvas-system-icons-web'; import { createSubcomponent } from '@workday/canvas-kit-react/common'; import { TertiaryButton } from '@workday/canvas-kit-react/button'; import { usePopupCloseButton, usePopupModel } from './hooks'; import { createStencil } from '@workday/canvas-kit-styling'; import { system } from '@workday/canvas-tokens-web'; import { mergeStyles } from '../../layout'; export const popupCloseIconStencil = createStencil({ base: { name: "1kf7ok", styles: "box-sizing:border-box;position:absolute;inset-inline-end:var(--cnvs-sys-space-x1);top:var(--cnvs-sys-space-x1);" } }, "popup-close-icon-fa3d15"); export const PopupCloseIcon = createSubcomponent('button')({ displayName: 'Popup.CloseIcon', modelHook: usePopupModel, elemPropsHook: usePopupCloseButton, })(({ children, ...elemProps }, Element) => { return (_jsx(TertiaryButton, { as: Element, size: "medium", icon: xIcon, type: "button", ...mergeStyles(elemProps, popupCloseIconStencil()) })); });