UNPKG

wix-style-react

Version:
71 lines (58 loc) 2.1 kB
'use strict'; Object.defineProperty(exports, "__esModule", { value: true }); exports.InputWithCustomErrorExample = exports.InputWithCustomStyleExample = exports.InputValidationErrorExample = undefined; var _react = require('react'); var _react2 = _interopRequireDefault(_react); var _Input = require('../../../src/TPA/Input'); var _Input2 = _interopRequireDefault(_Input); var _styles = require('./styles.scss'); var _styles2 = _interopRequireDefault(_styles); function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } var InputExample = function InputExample() { return _react2.default.createElement( 'div', { style: { width: '300px' } }, _react2.default.createElement(_Input2.default, { dataHook: 'story-input', placeholder: 'Default place holder', type: 'number' }) ); }; var InputValidationErrorExample = exports.InputValidationErrorExample = function InputValidationErrorExample() { return _react2.default.createElement( 'div', { style: { width: '300px' } }, _react2.default.createElement(_Input2.default, { dataHook: 'story-input-error', error: true, placeholder: 'Input in error state' }) ); }; var InputWithCustomStyleExample = exports.InputWithCustomStyleExample = function InputWithCustomStyleExample() { return _react2.default.createElement( 'div', { style: { width: '300px' } }, _react2.default.createElement(_Input2.default, { dataHook: 'story-input-style', inputClassName: _styles2.default.customInput, placeholder: 'Input with custom style' }) ); }; var InputWithCustomErrorExample = exports.InputWithCustomErrorExample = function InputWithCustomErrorExample() { return _react2.default.createElement( 'div', { style: { width: '300px' } }, _react2.default.createElement(_Input2.default, { dataHook: 'story-input-error-style', error: true, errorClassName: _styles2.default.customError, placeholder: 'Input with custom error style' }) ); }; exports.default = InputExample;