UNPKG

@workday/canvas-kit-react

Version:

The parent module that contains all Workday Canvas Kit React components

16 lines (15 loc) 604 B
import { jsx as _jsx } from "react/jsx-runtime"; import { styled, createComponent } from '@workday/canvas-kit-react/common'; import { Box } from '@workday/canvas-kit-react/layout'; const StyledButtonLabel = styled(Box.as('span'))({ position: 'relative', textOverflow: 'ellipsis', overflow: 'hidden', whiteSpace: 'nowrap', }); export const ButtonLabel = createComponent('span')({ displayName: 'ButtonLabel', Component: ({ children, ...elemProps }, ref, Element) => { return (_jsx(StyledButtonLabel, { as: Element, ref: ref, ...elemProps, children: children })); }, });