@atlaskit/navigation-system
Version:
The latest navigation system for Atlassian apps.
27 lines • 1.16 kB
JavaScript
/* themed-button.tsx generated by @compiled/babel-plugin v3.0.2 */
import _extends from "@babel/runtime/helpers/extends";
import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
var _excluded = ["iconBefore", "children"];
import "./themed-button.compiled.css";
import { ax, ix } from "@compiled/react/runtime";
import React, { forwardRef } from 'react';
import IconRenderer from '../icon-renderer';
import { ThemedPressable } from './themed-pressable';
var textButtonStyles = {
iconBefore: "_vwz4idpf",
text: "_k48p1wq8"
};
export var ThemedButton = /*#__PURE__*/forwardRef(function ThemedButton(_ref, ref) {
var IconBefore = _ref.iconBefore,
children = _ref.children,
props = _objectWithoutProperties(_ref, _excluded);
return /*#__PURE__*/React.createElement(ThemedPressable, _extends({}, props, {
ref: ref
}), IconBefore && /*#__PURE__*/React.createElement("span", {
className: ax([textButtonStyles.iconBefore])
}, /*#__PURE__*/React.createElement(IconRenderer, {
icon: IconBefore
})), /*#__PURE__*/React.createElement("span", {
className: ax([textButtonStyles.text])
}, children));
});