Skip to content

Instantly share code, notes, and snippets.

@phillmv
Created April 8, 2015 00:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save phillmv/1235e5b79f6f5e513cbf to your computer and use it in GitHub Desktop.
Save phillmv/1235e5b79f6f5e513cbf to your computer and use it in GitHub Desktop.
var React = require('react');
var Eui_button = React.createClass({
handleClick: function(e) {
e.preventDefault();
if(this.props.href !== undefined) {
this.props.href(e);
} else {
$(React.findDOMNode(this)).tooltip({title: "Sorry! Not yet."}).tooltip("show");
}
},
render: function() {
var btn_type = this.props.style || "default"
return (
<eui-button className={"ember-view eui-button-medium-" + btn_type}>
<button aria-label={this.props.value}></button>
<div className="eui-component">
<div className="eui-component-wrapper">
<div className="eui-label">
<a href="#" className="eui-label-value" onClick={this.handleClick}>
{this.props.value}
</a>
</div>
</div>
</div>
</eui-button>
)
}
});
module.exports = Eui_button;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment