UNPKG

wix-style-react

Version:
41 lines (38 loc) 1.05 kB
import React from 'react'; import InputWithOptions from 'wix-style-react/InputWithOptions'; 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: React.createElement( 'span', { style: { color: 'red' } }, 'Node option' ) }, { id: 4, value: 'Very long option text jldlkasj ldk jsalkdjsal kdjaklsjdlkasj dklasj' }]; export default (function () { return React.createElement( 'div', null, React.createElement( 'div', { style: style }, 'Bigger width', React.createElement(InputWithOptions, { dropdownWidth: '500px', options: options }) ), React.createElement( 'div', { style: style }, 'With offset', React.createElement(InputWithOptions, { dropdownWidth: '500px', dropdownOffsetLeft: '-150px', options: options }) ) ); });