diff --git a/src/components/Input/Input.tsx b/src/components/Input/Input.tsx index f18259b9..00288108 100644 --- a/src/components/Input/Input.tsx +++ b/src/components/Input/Input.tsx @@ -14,7 +14,6 @@ export interface InputProps const Input: React.FC = ({ className = '', onChange = () => {}, - readOnly = false, fauxDisabled = false, forwardedRef: ref, ...passedProps @@ -24,7 +23,6 @@ const Input: React.FC = ({ className={classNames(styles.Input, className, { [styles.disabled]: fauxDisabled, })} - readOnly={readOnly} ref={ref || undefined} onChange={onChange} {...passedProps} diff --git a/src/components/Input/README.md b/src/components/Input/README.md index eceecf8f..f81abd41 100644 --- a/src/components/Input/README.md +++ b/src/components/Input/README.md @@ -4,6 +4,10 @@ The basic `` doesn't add any behavior to the HTML element, it just adds styles. +The _onChange_ prop can be explictily transmitted to the component, otherwise all other props are transparently +forwarded onto the +underlying ``. + It also provides 1 custom prop - _fauxDisabled_: Applies the same style as disabled, but, unlike the real thing, doesn't stop click events. Useful for adding tooltips or other helpful behavior when a user tries to interact with a disabled field. diff --git a/src/components/Input/story.tsx b/src/components/Input/story.tsx index 1f33c34f..8b169963 100644 --- a/src/components/Input/story.tsx +++ b/src/components/Input/story.tsx @@ -32,17 +32,16 @@ storiesOf('Planets/Input', module) 'Overview', () => ( - - + {/* eslint-disable-next-line jsx-a11y/label-has-associated-control */} + ), { @@ -56,7 +55,7 @@ storiesOf('Planets/Input', module) 'Examples', () => ( -

Basic Input Examples

+

Input Examples

@@ -76,6 +75,36 @@ storiesOf('Planets/Input', module)
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
), {