boxicons/static/dist/2.bundle.js
2018-06-30 01:30:13 +05:30

2 lines
No EOL
3 KiB
JavaScript

webpackJsonp([2],{454:function(e,t,n){"use strict";function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function l(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function o(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function c(e){return{icons:e.icons}}function u(e){return(0,m.bindActionCreators)({fetchIcons:d.fetchIcons},e)}Object.defineProperty(t,"__esModule",{value:!0});var r=function(){function e(e,t){for(var n=0;n<t.length;n++){var a=t[n];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(e,a.key,a)}}return function(t,n,a){return n&&e(t.prototype,n),a&&e(t,a),t}}(),i=n(5),s=function(e){return e&&e.__esModule?e:{default:e}}(i),f=n(54),d=n(77),m=n(47),p=function(e){function t(e){a(this,t);var n=l(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return n.state={icons:{data:null}},n.copyCode=n.copyCode.bind(n),n}return o(t,e),r(t,[{key:"componentDidMount",value:function(){window.scrollTo(0,0)}},{key:"componentWillMount",value:function(){this.props.fetchIcons()}},{key:"componentWillReceiveProps",value:function(e){this.setState({icons:e.icons})}},{key:"copyCode",value:function(e){document.querySelector("input."+e).select(),document.execCommand("copy")}},{key:"render",value:function(){var e=this,t=s.default.createElement("tr",null,s.default.createElement("td",null),s.default.createElement("td",null));return null!==this.state.icons.data&&(t=this.state.icons.data.map(function(t,n){return s.default.createElement("tr",{onClick:function(){e.copyCode(t.name)},key:t.id},s.default.createElement("td",{width:"24"},s.default.createElement("i",{className:"bx bx-"+t.name})),s.default.createElement("td",null,t.name,s.default.createElement("input",{className:t.name+" hidden",onChange:function(){},type:"text",value:t.name}),s.default.createElement("i",{className:"bx bx-copy cs-copy"})))})),s.default.createElement("div",{className:"page-back"},s.default.createElement("div",{className:"page-cont"},s.default.createElement("div",{className:"page-cont-in"},s.default.createElement("div",{className:"page-head"},s.default.createElement("div",{className:"page-head-in"},s.default.createElement("h1",null,"Cheatsheet"),s.default.createElement("p",null,"Copy paste the name of any of ",null!==this.state.icons.data&&this.state.icons.data.length," icons"))),s.default.createElement("div",{className:"page-body"},s.default.createElement("table",null,s.default.createElement("thead",null,s.default.createElement("tr",null,s.default.createElement("th",null),s.default.createElement("th",null))),s.default.createElement("tbody",null,t))))))}}]),t}(i.Component);t.default=(0,f.connect)(c,u)(p)}});
//# sourceMappingURL=2.bundle.js.map