@atlaskit/lozenge
Version:
A lozenge is a visual indicator used to highlight an item's status for quick recognition.
15 lines • 594 B
JavaScript
import { jsx } from '@emotion/core';
import { gridSize } from '@atlaskit/theme/constants';
const HORIZONTAL_SPACING = `${gridSize() / 2}px`;
export default ({ maxWidth, children }) => (jsx("span", { css: {
display: 'inline-block',
verticalAlign: 'top',
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap',
boxSizing: 'border-box',
padding: `0 ${HORIZONTAL_SPACING}`,
maxWidth: typeof maxWidth === 'number' ? `${maxWidth}px` : maxWidth,
width: '100%',
} }, children));
//# sourceMappingURL=Content.js.map