UNPKG

@workday/canvas-kit-react

Version:

The parent module that contains all Workday Canvas Kit React components

25 lines (24 loc) 1.28 kB
import { jsx as _jsx } from "react/jsx-runtime"; import { createSubcomponent } from '@workday/canvas-kit-react/common'; import { createStencil, handleCsProp } from '@workday/canvas-kit-styling'; import { system } from '@workday/canvas-tokens-web'; import { usePopupModel } from './hooks'; export const popupButtonGroupStencil = createStencil({ base: { name: "17sp6z", styles: "box-sizing:border-box;display:flex;gap:var(--cnvs-sys-gap-sm, var(--cnvs-sys-space-x2, 0.5rem));@media screen and (max-width: 768px){flex-direction:column;}" }, modifiers: { position: { start: { name: "xrx0k", styles: "justify-content:flex-start;" }, center: { name: "3gnir2", styles: "justify-content:center;" }, end: { name: "jhsa9", styles: "justify-content:flex-end;" } }, grow: { true: { name: "2wbq67", styles: "& button{width:100%;}" } } } }, "popup-button-group-1d7c77"); export const PopupButtonGroup = createSubcomponent('div')({ displayName: 'Popup.ButtonGroup', modelHook: usePopupModel, })(({ children, position = 'end', grow, ...elemProps }, Element) => { return (_jsx(Element, { ...handleCsProp(elemProps, popupButtonGroupStencil({ position, grow })), children: children })); });