wix-style-react
Version:
wix-style-react
52 lines (42 loc) • 1.63 kB
JavaScript
'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: '-' }, {
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: 'אפשרות רביעית' }];
exports.default = function () {
return _react2.default.createElement(
'div',
null,
_react2.default.createElement(
'div',
{ style: style, className: 'ltr' },
'Left to right',
_react2.default.createElement(_InputWithOptions2.default, { options: options })
),
_react2.default.createElement(
'div',
{ style: style, className: 'rtl' },
'Right to left',
_react2.default.createElement(_InputWithOptions2.default, { options: rtlOptions, rtl: true })
)
);
};