Skip to content

Commit

Permalink
docs(textarea): add usage notes
Browse files Browse the repository at this point in the history
- add css rationale
  • Loading branch information
theetrain committed Dec 21, 2017
1 parent f27ad32 commit a77fc52
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/Input/Input.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ Input.propTypes = {
* A detailed explanation of the input expected by a form field. Can be text,
* other components, or HTML elements.
*
* If a function is provided, it must return an `Input.InputFeedback`. The function will be
* If a function is provided, it must return an `Input.Helper`. The function will be
* invoked with the following arguments.
*
* @param {String} feedback The input's current feedback state.
Expand Down
2 changes: 1 addition & 1 deletion src/components/Select/Select.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ Select.propTypes = {
* A detailed explanation of the input expected by a form field. Can be text,
* other components, or HTML elements.
*
* If a function is provided, it must return a `InputFeedback`. The function will be
* If a function is provided, it must return a `Input.Helper`. The function will be
* invoked with the following arguments.
*
* @param {String} feedback The input's current feedback state.
Expand Down
4 changes: 4 additions & 0 deletions src/components/Textarea/Textarea.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
### Minimal usage

When a form demands detailed content from the user, such as product feedback or support, then the Textarea component will fulfill that need.

```
<Textarea label="Enter some comments" onChange={e => console.log(e.target.value)}/>
```
2 changes: 1 addition & 1 deletion src/components/Textarea/Textarea.modules.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
// - I chose to prevent resizing the width to avoid edge cases due to the absolutely positioned icon.
max-width: 100%;
min-width: 100%;
min-height: 208px;
min-height: 208px; // preferred over `rows` attribute for cross-browser consistency
}

.feedbackIconPosition {
Expand Down

0 comments on commit a77fc52

Please sign in to comment.