@renderforest/rf-ui-library
Version:
Renderforest UI Library
1 lines • 1.91 kB
JavaScript
;Object.defineProperty(exports,"__esModule",{value:!0}),exports.StyledButton=void 0;var _styledComponents=require("styled-components"),_styledComponents2=_interopRequireDefault(_styledComponents),_helpers=require("../../helpers"),_consts=require("../../consts");function _interopRequireDefault(obj){return obj&&obj.__esModule?obj:{default:obj}}var StyledButton=exports.StyledButton=_styledComponents2["default"].button.withConfig({displayName:"styled__StyledButton",componentId:"sc-ihn4ts-0"})(["",";",";display:",";justify-content:center;align-items:center;cursor:pointer;flex-shrink:0;flex-grow:0;padding:",";font-size:",";font-weight:",";line-height:20px;border-radius:",";box-sizing:border-box;color:",";background:",";box-shadow:",";max-width:100%;border:none;outline:",";"," &:hover{background:",";}&:active{box-shadow:none;background:",";}"],_consts.styles.noSelect,_consts.styles.ellipsis,function(_ref){var fit=_ref.fit;return fit?"flex":"inline-flex"},function(_ref2){var size=_ref2.size;return _consts.sizes.buttons[size].padding},function(_ref3){var size=_ref3.size;return _consts.sizes.buttons[size].fontSize},function(_ref4){var weight=_ref4.weight;return weight},function(_ref5){var size=_ref5.size,isFlat=_ref5.isFlat;return isFlat?0:_consts.sizes.buttons[size].borderRadius},function(_ref6){var type=_ref6.type;return _consts.colors.buttons[type].color},function(_ref7){var type=_ref7.type;return _consts.colors.buttons[type].normal},function(_ref8){var type=_ref8.type,isFlat=_ref8.isFlat;return isFlat?"none":_consts.colors.buttons[type].shadow},function(_ref9){var hasOutline=_ref9.hasOutline;return hasOutline?"":"none"},_helpers.getDisabledProps,function(_ref10){var type=_ref10.type,disabled=_ref10.disabled;return disabled?_consts.colors.buttons[type].normal:_consts.colors.buttons[type].hover},function(_ref11){var type=_ref11.type;return _consts.colors.buttons[type].active});