Skip to content

Commit

Permalink
Merge 2c038c1 into caf610c
Browse files Browse the repository at this point in the history
  • Loading branch information
hvolschenk committed Jul 29, 2018
2 parents caf610c + 2c038c1 commit 7453acd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import TextField from '@materialr/textfield';
| ----------------------------- | --------------- | -------- | ---------- | -------------------------------------------------------------- |
| `box` | bool | No | false | Whether to render a box outline |
| `className` | string | No | undefined | Additional classNames to add |
| `defaultValue` | string | No | undefined | The default input value (uncontrolled element) |
| `disabled` | bool | No | false | Whether the input is disabled |
| `fullWidth` | bool | No | false | Whether the input is the full width of it's parent |
| `helperText` | string | No | undefined | The helper text to render beneath the field |
Expand All @@ -45,7 +46,7 @@ import TextField from '@materialr/textfield';
| `label` | string | Yes | N/A | The field's label |
| `lengthMaximum` | number | No | undefined | The maximum length of the field (HTML5 validation) |
| `lengthMinimum` | number | No | undefined | The minimum length of the field (HTML5 validation) |
| `name` | string | No | undefined | The name attribute of the input element |
| `name` | string | No | undefined | The name attribute of the input element |
| `onBlur` | func | No | undefined | The `blur` event handler |
| `onChange` | func | No | undefined | The `change` event handler |
| `onDragStart` | func | No | undefined | The `dragstart` event handler |
Expand Down
5 changes: 5 additions & 0 deletions src/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,7 @@ class TextField extends React.Component {
props: {
box,
className,
defaultValue,
disabled,
fullWidth,
helperText,
Expand Down Expand Up @@ -177,6 +178,7 @@ class TextField extends React.Component {
aria-controls={helperTextControlsId}
aria-label={label}
className="mdc-text-field__input"
defaultValue={defaultValue}
disabled={disabled}
id={getId()}
maxLength={lengthMaximum}
Expand All @@ -198,6 +200,7 @@ class TextField extends React.Component {
aria-controls={helperTextControlsId}
aria-label={label}
className="mdc-text-field__input"
defaultValue={defaultValue}
disabled={disabled}
id={getId()}
maxLength={lengthMaximum}
Expand Down Expand Up @@ -244,6 +247,7 @@ class TextField extends React.Component {
TextField.propTypes = {
box: PropTypes.bool,
className: PropTypes.string,
defaultValue: PropTypes.string,
disabled: PropTypes.bool,
fullWidth: PropTypes.bool,
helperText: PropTypes.string,
Expand Down Expand Up @@ -273,6 +277,7 @@ TextField.propTypes = {
TextField.defaultProps = {
box: false,
className: undefined,
defaultValue: undefined,
disabled: false,
fullWidth: false,
helperText: undefined,
Expand Down

0 comments on commit 7453acd

Please sign in to comment.