wix-style-react
Version:
wix-style-react
39 lines (35 loc) • 1.25 kB
JavaScript
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: '-' }, {
id: 5,
value: 'Very long option text jldlkasj ldk jsalkdjsal kdjaklsjdlkasj dklasj'
}];
var rtlOptions = [{ id: 0, value: 'אפשרות ראשונה' }, { id: 1, value: 'אפשרות שניה' }, { id: 2, value: 'אפשרות שלישית' }, { id: 3, value: '-' }, { id: 4, value: 'אפשרות רביעית' }];
export default (function () {
return React.createElement(
'div',
null,
React.createElement(
'div',
{ style: style, className: 'ltr' },
'Left to right',
React.createElement(InputWithOptions, { options: options })
),
React.createElement(
'div',
{ style: style, className: 'rtl' },
'Right to left',
React.createElement(InputWithOptions, { options: rtlOptions, rtl: true })
)
);
});