wix-style-react
Version:
wix-style-react
55 lines (51 loc) • 1.38 kB
JavaScript
import React from 'react';
import DropdownLayout from 'wix-style-react/DropdownLayout';
var style = {
display: 'inline-block',
padding: '0 5px',
width: '240px',
lineHeight: '22px'
};
var options = [{ id: 0, value: 'Option 1' }, { id: 1, value: 'Option 2' }, { id: 2, value: 'Option 3' }, { id: 3, value: 'Option 4' }, {
id: 'footer',
overrideStyle: true,
value: React.createElement(
'div',
{
style: {
height: '240px',
padding: '20px',
fontSize: '20',
backgroundColor: '#F0F'
}
},
'Click ',
React.createElement(
'a',
{ href: 'http://www.wix.com' },
'here'
),
' to go to wix.'
)
}];
var rtlOptions = [{ id: 0, value: 'אופציה 1' }, { id: 1, value: 'אופציה 2' }, { id: 2, value: 'אופציה 3' }, { id: 3, value: 'אופציה 4' }];
export default (function () {
return React.createElement(
'div',
null,
React.createElement(
'div',
{ style: style },
'Left to right',
React.createElement('br', null),
React.createElement(DropdownLayout, { visible: true, options: options })
),
React.createElement(
'div',
{ className: 'rtl', style: style },
'Right to left',
React.createElement('br', null),
React.createElement(DropdownLayout, { visible: true, options: rtlOptions })
)
);
});