@atlaskit/button
Version:
A button triggers an event or action. They let users know what will happen next.
23 lines (21 loc) • 697 B
JavaScript
;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getContentStyle = getContentStyle;
var _react = require("@emotion/react");
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
function getContentStyle(_ref) {
var spacing = _ref.spacing;
return (0, _react.css)({
// eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
margin: spacing === 'none' ? 0 : '0 2px',
// content can grow and shrink
flexGrow: 1,
flexShrink: 1,
// ellipsis for overflow text
overflow: 'hidden',
textOverflow: 'ellipsis',
whiteSpace: 'nowrap'
});
}