UNPKG

@atlaskit/button

Version:

A button triggers an event or action. They let users know what will happen next.

38 lines (36 loc) 2.34 kB
/* split-button-container.tsx generated by @compiled/babel-plugin v3.0.2 */ "use strict"; var _typeof = require("@babel/runtime/helpers/typeof"); Object.defineProperty(exports, "__esModule", { value: true }); exports.SplitButtonContainer = void 0; require("./split-button-container.compiled.css"); var React = _interopRequireWildcard(require("react")); var _runtime = require("@compiled/react/runtime"); function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); } var buttonStyles = { splitButton: "_1e0c116y _kqswh2mm _4cvr1h6o _o5721q9c", defaultAppearanceContainer: "_2rko1qi0 _12ji1l7x _1cwg1n1a _1qu2nqa1 _12y3t94y", defaultAppearanceDisabledContainer: "_12jibk0g" }; // TODO: Fill in the component {description} and ensure links point to the correct {packageName} location. // Remove links that the component does not have (such as usage). If there are no links remove them all. /** * __Split button container__ * * A split button container {description}. * * - [Examples](https://atlassian.design/components/{packageName}/examples) * - [Code](https://atlassian.design/components/{packageName}/code) * - [Usage](https://atlassian.design/components/{packageName}/usage) */ var SplitButtonContainer = exports.SplitButtonContainer = function SplitButtonContainer(_ref) { var appearance = _ref.appearance, children = _ref.children, _ref$isDisabled = _ref.isDisabled, isDisabled = _ref$isDisabled === void 0 ? false : _ref$isDisabled; return /*#__PURE__*/React.createElement("div", { className: (0, _runtime.ax)([appearance === 'default' && buttonStyles.defaultAppearanceContainer, appearance === 'default' && isDisabled && buttonStyles.defaultAppearanceDisabledContainer, buttonStyles.splitButton]) }, children); };