UNPKG

@wulperstudio/cms

Version:
64 lines (63 loc) 2.3 kB
"use strict"; var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault"); Object.defineProperty(exports, "__esModule", { value: true }); exports.ToggleButtonSizes = void 0; var _react = _interopRequireDefault(require("react")); var _react2 = require("@iconify/react"); var _styled = require("./styled"); var _jsxRuntime = require("react/jsx-runtime"); var ToggleButtonSizes = exports.ToggleButtonSizes = function ToggleButtonSizes(_ref) { var backgroundColor = _ref.backgroundColor, iconColor = _ref.iconColor, _ref$iconLeft = _ref.iconLeft, iconLeft = _ref$iconLeft === void 0 ? 'clarity:moon-line' : _ref$iconLeft, _ref$iconRight = _ref.iconRight, iconRight = _ref$iconRight === void 0 ? 'akar-icons:sun' : _ref$iconRight, onCardsFunction = _ref.onCardsFunction, onTableFunction = _ref.onTableFunction, value = _ref.value, boxProps = _ref.boxProps, onChange = _ref.onChange, backgrondColorSelected = _ref.backgrondColorSelected, valueLeft = _ref.valueLeft, valueRight = _ref.valueRight; return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_styled.Root, Object.assign({ backgroundColor: backgroundColor, exclusive: true, onChange: onChange, size: "medium", value: value }, boxProps, { children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_styled.Left, { value: valueLeft || 'table', onClick: function onClick() { return onTableFunction && onTableFunction(); }, backgroundColor: backgrondColorSelected, children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_styled.Fab, { children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_react2.Icon, { icon: iconLeft, color: iconColor, height: "20px", width: "20px" }) }) }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_styled.Right, { value: valueRight || 'cards', onClick: function onClick() { return onCardsFunction && onCardsFunction(); }, backgroundColor: backgrondColorSelected, children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_styled.Fab, { children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_react2.Icon, { icon: iconRight, color: iconColor, height: "20px", width: "20px" }) }) })] })); };