Skip to content

Commit

Permalink
Merge pull request #1 from JoshKoberstein/master
Browse files Browse the repository at this point in the history
Adding password component
  • Loading branch information
Khaled Jouda committed Jun 3, 2015
2 parents ab9e690 + 5e877b4 commit 6782321
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 1 deletion.
2 changes: 1 addition & 1 deletion dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lib/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ module.exports = {
ListContainer: require('./listContainer.jsx'),
ListItem: require('./listItem.jsx'),
LinkButton: require('./linkButton.jsx'),
Password: require('./password.jsx'),
TextInput: require('./textInput.jsx'),
Textarea: require('./textarea.jsx'),
Switch: require('./switch.jsx'),
Expand Down
34 changes: 34 additions & 0 deletions lib/password.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/** @jsx React.DOM */
var React = require('react');
var ClassSet = require('./classSet');

module.exports = React.createClass({

displayName: 'Password',

propTypes:{
large: React.PropTypes.bool,
full: React.PropTypes.bool
},

getDefaultProps: function(){
return {
large: false,
full: false
};
},


render: function(){

var classSet = ClassSet({
'topcoat-text-input': !this.props.large ,
'topcoat-text-input--large': this.props.large,
full: this.props.full
});

return this.transferPropsTo(
<input type="password" className={classSet} />
);
}
});

0 comments on commit 6782321

Please sign in to comment.