wix-style-react
Version:
wix-style-react
54 lines (48 loc) • 1.51 kB
JavaScript
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; };
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',
verticalAlign: 'top'
};
var defaultProps = {
size: 'normal',
magnifyingGlass: true,
placeholder: 'They did not know it was impossible, so they did it!',
unit: '$'
};
var Example = function Example(_ref) {
var theme = _ref.theme;
return React.createElement(
'div',
null,
React.createElement(
'div',
{ style: style },
'Small',
React.createElement(Input, _extends({ theme: theme }, defaultProps, { size: 'small', roundInput: true }))
),
React.createElement(
'div',
{ style: style },
'Normal',
React.createElement('br', null),
React.createElement(Input, _extends({ theme: theme }, defaultProps, { size: 'normal', roundInput: true }))
),
React.createElement(
'div',
{ style: style },
'Large',
React.createElement('br', null),
React.createElement(Input, _extends({ theme: theme }, defaultProps, { size: 'large', roundInput: true }))
)
);
};
Example.propTypes = {
theme: PropTypes.string
};
export default Example;