UNPKG

@workday/canvas-kit-react

Version:

The parent module that contains all Workday Canvas Kit React components

16 lines (15 loc) 540 B
import { jsx as _jsx } from "react/jsx-runtime"; import styled from '@emotion/styled'; import { createComponent } from './utils'; export const ellipsisStyles = { whiteSpace: 'nowrap', textOverflow: 'ellipsis', overflow: 'hidden', }; const StyledEllipsisComponent = styled('span')(ellipsisStyles); export const EllipsisText = createComponent('span')({ displayName: 'EllipsisText', Component(elemProps = {}, ref, Element) { return _jsx(StyledEllipsisComponent, { as: Element, ref: ref, ...elemProps }); }, });