UNPKG

@workday/canvas-kit-react

Version:

The parent module that contains all Workday Canvas Kit React components

16 lines (15 loc) 587 B
import React from 'react'; 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 (React.createElement(StyledButtonLabel, { as: Element, ref: ref, ...elemProps }, children)); }, });