UNPKG

wix-style-react

Version:
54 lines (50 loc) 1.31 kB
import React from 'react'; import PropTypes from 'prop-types'; import Input from 'wix-style-react/Input'; var style = { display: 'inline-block', padding: '0 5px', width: '200px', lineHeight: '22px' }; var Example = function Example(_ref) { var theme = _ref.theme; return React.createElement( 'div', null, React.createElement( 'div', { style: style }, 'Left to right', React.createElement(Input, { theme: theme, magnifyingGlass: true }) ), React.createElement( 'div', { className: 'rtl', style: style }, 'Right to left', React.createElement(Input, { theme: theme, rtl: true, magnifyingGlass: true }) ), React.createElement( 'div', { style: style }, 'With unit', React.createElement(Input, { theme: theme, magnifyingGlass: true, unit: '$' }) ), React.createElement( 'div', { style: style }, 'With error', React.createElement(Input, { theme: theme, magnifyingGlass: true, error: true }) ), React.createElement( 'div', { style: style }, 'With unit & error', React.createElement(Input, { theme: theme, magnifyingGlass: true, error: true, unit: '$' }) ) ); }; Example.propTypes = { theme: PropTypes.string }; export default Example;