d2-ui
Version:
1 lines • 1.32 kB
JavaScript
function(){var t,e,r,o,n=function(t,e){return function(){return t.apply(e,arguments)}},i=function(t,e){function r(){this.constructor=t}for(var o in e)p.call(e,o)&&(t[o]=e[o]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t},p={}.hasOwnProperty;t=require("react"),o=require("reactcss"),r={primaryColor:"#2196F3",accentColor:"#E91E63",theme:"light"},e=function(e){function r(){return this.handleClick=n(this.handleClick,this),r.__super__.constructor.apply(this,arguments)}return i(r,e),r.prototype.css=o.inline,r.propTypes={selected:t.PropTypes.bool},r.defaultProps={selected:!1,color:"#fff"},r.prototype.classes=function(){return{"default":{tab:{color:this.props.color,cursor:"pointer",paddingLeft:"12px",paddingRight:"12px",height:"48px",lineHeight:"48px",textAlign:"center",fontSize:"14px",textTransform:"uppercase",fontWeight:"500",whiteSpace:"nowrap",opacity:".47",transition:"opacity 100ms linear"}},"public":{tab:{}},selected:{tab:{opacity:".87"}}}},r.prototype.styles=function(){return this.css()},r.prototype.handleClick=function(){return this.props.selectable!==!1?this.props.onClick(this.props.tab):void 0},r.prototype.render=function(){return t.createElement("div",{is:"tab",onClick:this.handleClick},this.props.children)},r}(t.Component),module.exports=e}).call(void 0);
;(