@workday/canvas-kit-react
Version:
The parent module that contains all Workday Canvas Kit React components
25 lines (24 loc) • 1.28 kB
JavaScript
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: "34x7v3", 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: "3ntg9g", styles: "justify-content:flex-start;" },
center: { name: "1uy3cv", styles: "justify-content:center;" },
end: { name: "3dtee1", styles: "justify-content:flex-end;" }
},
grow: {
true: { name: "2xrg3w", 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 }));
});