UNPKG

wix-style-react

Version:
51 lines (47 loc) 1.41 kB
import React from 'react'; import AutoComplete from 'wix-style-react/AutoComplete'; 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: 4, value: 'Very long option text jldlkasj ldk jsalkdjsal kdjaklsjdlkasj dklasj' }]; var rtlOptions = [{ id: 0, value: 'אפשרות ראשונה' }, { id: 1, value: 'אפשרות שניה' }, { id: 2, value: 'אפשרות שלישית' }]; export default (function () { return React.createElement( 'div', null, React.createElement( 'div', { style: style }, 'Left to right', React.createElement(AutoComplete, { options: options }) ), React.createElement( 'div', { style: style, className: 'rtl' }, 'Right to left', React.createElement(AutoComplete, { options: rtlOptions }) ), React.createElement( 'div', { style: style }, 'Disabled', React.createElement(AutoComplete, { disabled: true, options: rtlOptions }) ), React.createElement( 'div', { style: style }, 'Error', React.createElement(AutoComplete, { error: true, errorMessage: 'This is an error message', options: rtlOptions }) ) ); });