@@ -1,122 +0,0 @@
1−import React from 'react';
2−import PropTypes from 'prop-types';
23− // validated component props (if wrapped)
25− validationClassnames,
33− const _disabled = disabled === true ? 'br-gray-30' : '';
35− const s = getStyles(styleManifest, format, size);
37− // This enables all children of this component to share the state of this
39− const childrenWithProps = React.Children.map(children, child =>
40− React.cloneElement(child, { displayPass, displayFailure, focussed })
44− <div className={'rel'}>
46− className={`bw-2 flex bs-solid ${s} ${validationClassnames} ${_disabled} ${className}`}
47− onChange={e => onChange(e)}
48− onFocus={e => onFocus(e)}
49− onBlur={e => onBlur(e)}
50− placeholder={placeholder}
56− autoFocus={autoFocus}
57− maxLength={maxLength}
61− {displayFailure === true && isValidated === true ? (
62− <div className={'yellow text-600 h-6 mt-1'}>{error}</div>
70−const getStyles = (m, t, s) => `${m[t][s] || ''}`;
72−const styleManifest = {
75− m: 'h-40 fs-35 ph-4',
76− s: 'h-24 fs-35 ph-1',
80−TextArea.propTypes = {
81− disabled: PropTypes.bool,
82− onChange: PropTypes.func,
83− onBlur: PropTypes.func,
84− onFocus: PropTypes.func,
85− className: PropTypes.string,
86− children: PropTypes.node,
87− autoFocus: PropTypes.bool,
88− maxLength: PropTypes.number,
89− readOnly: PropTypes.bool,
90− name: PropTypes.string,
91− value: PropTypes.string,
92− row: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
93− col: PropTypes.oneOfType([PropTypes.string, PropTypes.number]),
94− isSelected: PropTypes.bool,
95− hasBeenSelected: PropTypes.bool,
96− hasSubmitted: PropTypes.bool,
97− displayPass: PropTypes.bool,
98− displayFailure: PropTypes.bool,
99− error: PropTypes.string,
100− validationClassnames: PropTypes.string,
103−TextArea.defaultProps = {
112− hasBeenSelected: false,
113− hasSubmitted: false,
115− displayFailure: false,
119− validationClassnames: 'br-gray-50 f-br-blue outline-blue',
122−export default TextArea;