UNPKG

@workday/canvas-kit-react

Version:

The parent module that contains all Workday Canvas Kit React components

16 lines (15 loc) 956 B
import { jsx as _jsx } from "react/jsx-runtime"; import { createSubcomponent } from '@workday/canvas-kit-react/common'; import { useToastModel } from './hooks/useToastModel'; import { Subtext } from '@workday/canvas-kit-react/text'; import { createStencil } from '@workday/canvas-kit-styling'; import { mergeStyles } from '@workday/canvas-kit-react/layout'; import { system } from '@workday/canvas-tokens-web'; export const toastMessageStencil = createStencil({ base: { name: "3tl2h4", styles: "box-sizing:border-box;word-break:break-word;margin-block-start:var(--cnvs-sys-space-zero);margin-block-end:var(--cnvs-sys-space-zero);" } }, "toast-message-19d226"); export const ToastMessage = createSubcomponent('p')({ modelHook: useToastModel, })(({ children, ...elemProps }, Element, model) => { return (_jsx(Subtext, { size: "large", id: model.state.id, as: Element, ...mergeStyles(elemProps, toastMessageStencil()), children: children })); });