forked from muicss/mui
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathoption.jsx
More file actions
46 lines (34 loc) · 732 Bytes
/
option.jsx
File metadata and controls
46 lines (34 loc) · 732 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
/**
* MUI React options module
* @module react/option
*/
'use strict';
import React from 'react';
import * as formlib from '../js/lib/forms';
import * as jqLite from '../js/lib/jqLite';
import * as util from '../js/lib/util';
const PropTypes = React.PropTypes;
/**
* Option constructor
* @class
*/
class Option extends React.Component {
static propTypes = {
value: PropTypes.string,
label: PropTypes.string
};
static defaultProps = {
value: null,
label: null
};
render() {
let { children, ...other } = this.props;
return (
<option { ...other } value={this.props.value}>
{this.props.label}
</option>
);
}
}
/** Define module API */
export default Option;