34 lines
No EOL
826 B
JavaScript
Executable file
34 lines
No EOL
826 B
JavaScript
Executable file
'use strict';
|
|
|
|
var React = require('react');
|
|
var classes = require('classnames');
|
|
|
|
var SingleValue = React.createClass({
|
|
displayName: 'SingleValue',
|
|
|
|
propTypes: {
|
|
placeholder: React.PropTypes.string, // this is default value provided by React-Select based component
|
|
value: React.PropTypes.object // selected option
|
|
},
|
|
render: function render() {
|
|
var classNames = classes('Select-placeholder', this.props.value && this.props.value.className);
|
|
return React.createElement(
|
|
'div',
|
|
{
|
|
className: classNames,
|
|
style: this.props.value && this.props.value.style,
|
|
title: this.props.value && this.props.value.title
|
|
},
|
|
this.props.placeholder
|
|
);
|
|
}
|
|
});
|
|
|
|
module.exports = SingleValue;
|
|
|
|
|
|
//////////////////
|
|
// WEBPACK FOOTER
|
|
// ./~/react-select/lib/SingleValue.js
|
|
// module id = 2800
|
|
// module chunks = 4
|