UNPKG

wix-style-react

Version:
54 lines (45 loc) 1.44 kB
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); var _react = require('react'); var _react2 = _interopRequireDefault(_react); var _InputWithOptions = require('wix-style-react/InputWithOptions'); var _InputWithOptions2 = _interopRequireDefault(_InputWithOptions); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var style = { display: 'inline-block', padding: '0 5px 0', width: '200px', lineHeight: '22px' }; var options = [{ id: 0, value: 'First option' }, { id: 1, value: 'Unselectable option', unselectable: true }, { id: 2, value: 'Third option' }, { id: 3, value: _react2.default.createElement( 'span', { style: { color: 'red' } }, 'Node option' ) }, { id: 4, value: 'Very long option text jldlkasj ldk jsalkdjsal kdjaklsjdlkasj dklasj' }]; exports.default = function () { return _react2.default.createElement( 'div', null, _react2.default.createElement( 'div', { style: style }, 'Bigger width', _react2.default.createElement(_InputWithOptions2.default, { dropdownWidth: '500px', options: options }) ), _react2.default.createElement( 'div', { style: style }, 'With offset', _react2.default.createElement(_InputWithOptions2.default, { dropdownWidth: '500px', dropdownOffsetLeft: '-150px', options: options }) ) ); };