diff options
-rw-r--r-- | packages/forms/src/input/index.tsx | 6 | ||||
-rw-r--r-- | uidev/src/stories/input.stories.tsx | 8 |
2 files changed, 14 insertions, 0 deletions
diff --git a/packages/forms/src/input/index.tsx b/packages/forms/src/input/index.tsx index 478738cad..ab1c33315 100644 --- a/packages/forms/src/input/index.tsx +++ b/packages/forms/src/input/index.tsx | |||
@@ -102,6 +102,9 @@ class InputComponent extends Component<IProps, IState> { | |||
102 | spellCheck, | 102 | spellCheck, |
103 | onBlur, | 103 | onBlur, |
104 | onFocus, | 104 | onFocus, |
105 | min, | ||
106 | max, | ||
107 | step, | ||
105 | } = this.props; | 108 | } = this.props; |
106 | 109 | ||
107 | const { | 110 | const { |
@@ -147,6 +150,9 @@ class InputComponent extends Component<IProps, IState> { | |||
147 | onFocus={onFocus} | 150 | onFocus={onFocus} |
148 | onBlur={onBlur} | 151 | onBlur={onBlur} |
149 | disabled={disabled} | 152 | disabled={disabled} |
153 | min={min} | ||
154 | max={max} | ||
155 | step={step} | ||
150 | /> | 156 | /> |
151 | {suffix && ( | 157 | {suffix && ( |
152 | <span className={classes.suffix}> | 158 | <span className={classes.suffix}> |
diff --git a/uidev/src/stories/input.stories.tsx b/uidev/src/stories/input.stories.tsx index c522a10c7..af5e791d0 100644 --- a/uidev/src/stories/input.stories.tsx +++ b/uidev/src/stories/input.stories.tsx | |||
@@ -66,6 +66,14 @@ storiesOf('Input') | |||
66 | value="faulty input" | 66 | value="faulty input" |
67 | error="This is a generic error message." | 67 | error="This is a generic error message." |
68 | /> | 68 | /> |
69 | )) | ||
70 | .add('Type number with min & max', () => ( | ||
71 | <Input | ||
72 | {...defaultProps()} | ||
73 | type="number" | ||
74 | min={1} | ||
75 | max={10} | ||
76 | /> | ||
69 | )); | 77 | )); |
70 | 78 | ||
71 | storiesOf('Password') | 79 | storiesOf('Password') |