1
0
mirror of https://github.com/Unleash/unleash.git synced 2024-12-28 00:06:53 +01:00
unleash.unleash/public/js/components/User.jsx

24 lines
496 B
React
Raw Normal View History

var React = require('react');
var UserStore = require('../stores/UserStore');
var User = React.createClass({
onSave: function() {
var value = this.refs.username.getDOMNode().value.trim();
UserStore.set(value);
},
render: function() {
return (
2015-02-05 16:22:12 +01:00
<div className="r-pvm">
<input type="text" placeholder="username"
ref="username"
defaultValue={UserStore.get()}
onBlur={this.onSave} />
</div>
);
}
});
module.exports = User;