Files
optolith-client/js/components/Label.js
T
Lukas Obermann 9413a6db1f Added missing inventory features
Smaller changes:
- Optimized a few SCSS files
2016-12-25 16:23:55 +13:00

21 lines
453 B
JavaScript

import classNames from 'classnames';
import React, { Component, PropTypes } from 'react';
export default class Label extends Component {
static propTypes = {
className: PropTypes.string,
disabled: PropTypes.bool,
text: PropTypes.string
};
render() {
let { className, disabled, text, ...other } = this.props;
return text ? (
<label {...other} className={classNames(className, disabled && 'disabled')}>{text}</label>
) : null;
}
}