@atlaskit/button
Version:
A button triggers an event or action. They let users know what will happen next.
36 lines (35 loc) • 1.56 kB
JavaScript
/* content.tsx generated by @compiled/babel-plugin v0.39.1 */
;
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
require("./content.compiled.css");
var _runtime = require("@compiled/react/runtime");
var _react = _interopRequireDefault(require("react"));
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
var styles = {
text: "_1reo15vq _18m915vq _16jlkb7n _1o9zkb7n _1bto1l2s _o5721q9c",
icon: "_1e0c1txw _16jlidpf _1o9zidpf _1wpz1h6o _1wybidpf _vwz4idpf _uiztglyw",
common: "_v564g17y",
fade: "_tzy4idpf",
beforeIcon: "_1he91b66 _w795v77o",
afterIcon: "_1he9v77o _w7951b66"
};
/**
* __Content__
*
* Used for slots within a Button, including icons and text content.
*/
var Content = function Content(_ref) {
var children = _ref.children,
_ref$type = _ref.type,
type = _ref$type === void 0 ? 'text' : _ref$type,
isLoading = _ref.isLoading,
position = _ref.position;
return /*#__PURE__*/_react.default.createElement("span", {
className: (0, _runtime.ax)([styles.common, type === 'text' && styles.text, type === 'icon' && styles.icon, isLoading && styles.fade, !(0, _platformFeatureFlags.fg)('platform-button-icon-spacing-cleanup') && position === 'before' && styles.beforeIcon, !(0, _platformFeatureFlags.fg)('platform-button-icon-spacing-cleanup') && position === 'after' && styles.afterIcon])
}, children);
};
var _default = exports.default = Content;