UNPKG

coming

Version:

又是一个无聊的项目🥱,🍺

71 lines (57 loc) 3.18 kB
import * as React from 'react'; import React__default from 'react'; function styleInject(css, ref) { if ( ref === void 0 ) ref = {}; var insertAt = ref.insertAt; if (!css || typeof document === 'undefined') { return; } var head = document.head || document.getElementsByTagName('head')[0]; var style = document.createElement('style'); style.type = 'text/css'; if (insertAt === 'top') { if (head.firstChild) { head.insertBefore(style, head.firstChild); } else { head.appendChild(style); } } else { head.appendChild(style); } if (style.styleSheet) { style.styleSheet.cssText = css; } else { style.appendChild(document.createTextNode(css)); } } var css_248z = ".Button_button__8Tf14 {\n border: none;\n}\n\n.Button_default__hVGS6 {\n}\n"; var styles = {"button":"Button_button__8Tf14","default":"Button_default__hVGS6 Button_button__8Tf14"}; styleInject(css_248z); const classnames = (styles, keys) => { let classnameFormat = ``; keys.forEach((e) => { classnameFormat = classnameFormat + ` ${styles[e]}`; }); return classnameFormat; }; const Button = (props) => { return (React__default.createElement("button", { className: classnames(styles, ["default", "small"]), onClick: () => (props.onClick === undefined ? null : props.onClick("333")) }, props.children)); }; var _path; function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } var SvgDemo = function SvgDemo(props) { return /*#__PURE__*/React.createElement("svg", _extends({ className: "demo_svg__icon", viewBox: "0 0 1024 1024", xmlns: "http://www.w3.org/2000/svg", width: "1em", height: "1em" }, props), _path || (_path = /*#__PURE__*/React.createElement("path", { d: "M695.757 323.226C867.02 104.909 668.314 91.853 622.54 108.698c-58.778-55.04-147.712-52.173-206.49 3.942-277.145-38.042-91.494 210.586-91.494 210.586C63.437 480.41 76.186 690.534 86.63 796.467s135.578 136.909 135.578 136.909H834.97c73.523 0 105.881-75.469 115.712-134.298 37.273-307.865-118.938-379.136-254.925-475.852zm8.857 369.254c16.948 0 30.72 13.773 30.72 30.72s-13.772 30.72-30.72 30.72H549.786v66.662c0 16.948-13.773 30.72-30.72 30.72s-30.72-13.772-30.72-30.72V753.92h-154.83c-16.946 0-30.72-13.773-30.72-30.72s13.774-30.72 30.72-30.72h154.83v-62.566h-154.83c-16.946 0-30.72-13.773-30.72-30.72s13.774-30.72 30.72-30.72h127.95l-90.83-81.818a30.694 30.694 0 0 1-2.252-43.366 30.694 30.694 0 0 1 43.366-2.253l107.725 97.024 109.875-97.178c12.698-11.264 32.103-10.035 43.367 2.663 11.264 12.697 10.035 32.102-2.663 43.366l-92.262 81.613h126.822c16.948 0 30.72 13.773 30.72 30.72s-13.772 30.72-30.72 30.72H549.786v62.566h154.828z", fill: "#FF623E" }))); }; const Icon = ({ name }) => { return (React__default.createElement("span", null, React__default.createElement(SvgDemo, null))); }; export { Button, Icon }; //# sourceMappingURL=index.js.map