-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(TextArea): add minHeight property, docs example (#1679)
* add minHeight property, example to docs * add rows prop/adjust minHeight prop usage * mixed(TextArea): update docs, tests, props and typings * fix(Textarea): move back minHeight prop to style
- Loading branch information
1 parent
62b0fd6
commit 01bdd6f
Showing
12 changed files
with
199 additions
and
56 deletions.
There are no files selected for viewing
4 changes: 2 additions & 2 deletions
4
.../addons/TextArea/Usage/TextAreaExample.js → ...TextArea/Types/TextAreaExampleTextArea.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
import React from 'react' | ||
import { Form, TextArea } from 'semantic-ui-react' | ||
|
||
const TextAreaExample = () => ( | ||
const TextAreaExampleTextArea = () => ( | ||
<Form> | ||
<TextArea placeholder='Tell us more' /> | ||
</Form> | ||
) | ||
|
||
export default TextAreaExample | ||
export default TextAreaExampleTextArea |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import React from 'react' | ||
|
||
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample' | ||
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection' | ||
|
||
const TextAreaTypesExamples = () => ( | ||
<ExampleSection title='Types'> | ||
<ComponentExample | ||
title='TextArea' | ||
description='A default TextArea.' | ||
examplePath='addons/TextArea/Types/TextAreaExampleTextArea' | ||
/> | ||
</ExampleSection> | ||
) | ||
|
||
export default TextAreaTypesExamples |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 10 additions & 0 deletions
10
docs/app/Examples/addons/TextArea/Usage/TextAreaExampleAutoHeightMinHeight.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from 'react' | ||
import { Form, TextArea } from 'semantic-ui-react' | ||
|
||
const TextAreaExampleAutoHeightMinHeight = () => ( | ||
<Form> | ||
<TextArea autoHeight placeholder='Try adding multiple lines' style={{ minHeight: 100 }} /> | ||
</Form> | ||
) | ||
|
||
export default TextAreaExampleAutoHeightMinHeight |
10 changes: 10 additions & 0 deletions
10
docs/app/Examples/addons/TextArea/Usage/TextAreaExampleAutoHeightRows.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from 'react' | ||
import { Form, TextArea } from 'semantic-ui-react' | ||
|
||
const TextAreaExampleAutoHeightRows = () => ( | ||
<Form> | ||
<TextArea autoHeight placeholder='Try adding multiple lines' rows={1} /> | ||
</Form> | ||
) | ||
|
||
export default TextAreaExampleAutoHeightRows |
10 changes: 10 additions & 0 deletions
10
docs/app/Examples/addons/TextArea/Usage/TextAreaExampleMinHeight.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from 'react' | ||
import { Form, TextArea } from 'semantic-ui-react' | ||
|
||
const TextAreaExampleMinHeight = () => ( | ||
<Form> | ||
<TextArea placeholder='Tell us more' style={{ minHeight: 100 }} /> | ||
</Form> | ||
) | ||
|
||
export default TextAreaExampleMinHeight |
10 changes: 10 additions & 0 deletions
10
docs/app/Examples/addons/TextArea/Usage/TextAreaExampleRows.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import React from 'react' | ||
import { Form, TextArea } from 'semantic-ui-react' | ||
|
||
const TextAreaExampleRows = () => ( | ||
<Form> | ||
<TextArea rows={2} placeholder='Tell us more' /> | ||
</Form> | ||
) | ||
|
||
export default TextAreaExampleRows |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,36 @@ | ||
import React from 'react' | ||
|
||
import ComponentExample from 'docs/app/Components/ComponentDoc/ComponentExample' | ||
import ExampleSection from 'docs/app/Components/ComponentDoc/ExampleSection' | ||
|
||
const TextAreaTypesExamples = () => ( | ||
const TextAreaUsageExamples = () => ( | ||
<ExampleSection title='Usage'> | ||
<ComponentExample | ||
title='TextArea' | ||
description='A default TextArea.' | ||
examplePath='addons/TextArea/Usage/TextAreaExample' | ||
title='Min Height' | ||
description='A TextArea can have a minimum height.' | ||
examplePath='addons/TextArea/Usage/TextAreaExampleMinHeight' | ||
/> | ||
|
||
<ComponentExample | ||
title='Rows' | ||
description='A TextArea can have a minimum number of rows.' | ||
examplePath='addons/TextArea/Usage/TextAreaExampleRows' | ||
/> | ||
|
||
<ComponentExample | ||
title='Auto Height' | ||
description='A TextArea can adjust its height to fit its contents.' | ||
examplePath='addons/TextArea/Usage/TextAreaExampleAutoHeight' | ||
/> | ||
<ComponentExample | ||
description='A TextArea can adjust its height to fit its contents and depend on minHeight value.' | ||
examplePath='addons/TextArea/Usage/TextAreaExampleAutoHeightMinHeight' | ||
/> | ||
<ComponentExample | ||
description='A TextArea can adjust its height to fit its contents and depend on rows value.' | ||
examplePath='addons/TextArea/Usage/TextAreaExampleAutoHeightRows' | ||
/> | ||
</ExampleSection> | ||
) | ||
|
||
export default TextAreaTypesExamples | ||
export default TextAreaUsageExamples |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.