-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update README.md * Improve documentation * Update README.md
- Loading branch information
Showing
8 changed files
with
97 additions
and
105 deletions.
There are no files selected for viewing
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: 5 additions & 5 deletions
10
docs/build/bundle.bef7c920.js → docs/build/bundle.26055c75.js
Large diffs are not rendered by default.
Oops, something went wrong.
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 +1 @@ | ||
<!DOCTYPE html><html><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><title>React Form Control v0.1.0</title><link href="main.css" rel="stylesheet"></head><body><div id="rsg-root"></div><script src="build/bundle.bef7c920.js"></script></body></html> | ||
<!DOCTYPE html><html><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><meta http-equiv="X-UA-Compatible" content="ie=edge"><title>React Form Control v0.1.0</title><link href="main.css" rel="stylesheet"></head><body><div id="rsg-root"></div><script src="build/bundle.26055c75.js"></script></body></html> |
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,44 +1,34 @@ | ||
### Sizing | ||
|
||
```jsx | ||
<FormGroup> | ||
<FormControl fcSize="lg"> | ||
Large | ||
</FormControl> | ||
</FormGroup> | ||
<FormGroup> | ||
<FormControl fcSize="md"> | ||
Medium | ||
</FormControl> | ||
</FormGroup> | ||
<FormGroup> | ||
<FormControl fcSize="sm"> | ||
Small | ||
</FormControl> | ||
</FormGroup> | ||
<FormGroup> | ||
<FormControl fcSize="xs"> | ||
Extra small | ||
</FormControl> | ||
</FormGroup> | ||
<FormControl fcSize="lg"> | ||
Large | ||
</FormControl> | ||
<FormControl fcSize="md"> | ||
Medium | ||
</FormControl> | ||
<FormControl fcSize="sm"> | ||
Small | ||
</FormControl> | ||
<FormControl fcSize="xs"> | ||
Extra small | ||
</FormControl> | ||
``` | ||
|
||
### Plain text | ||
|
||
If you want to have form controls styled as plain text, use inline style to override the default form control styling and preserve the correct margin and padding. | ||
|
||
```jsx | ||
<FormGroup> | ||
<FormControl style={{ borderColor: 'transparent', height: 'auto' }}> | ||
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. | ||
</FormControl> | ||
</FormGroup> | ||
<FormControl style={{ borderColor: 'transparent', height: 'auto' }}> | ||
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. | ||
</FormControl> | ||
``` | ||
### Text Overflow | ||
```jsx | ||
<FormGroup> | ||
<FormControl style={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}> | ||
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. | ||
</FormControl> | ||
</FormGroup> | ||
<FormControl style={{ overflow: 'hidden', textOverflow: 'ellipsis', whiteSpace: 'nowrap' }}> | ||
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum. | ||
</FormControl> | ||
``` |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,31 @@ | ||
```jsx | ||
<FormGroup> | ||
<Textarea placeholder="Enter a message in the textarea" rows={3} /> | ||
</FormGroup> | ||
<Textarea placeholder="Enter a message in the textarea" rows={3} /> | ||
``` | ||
|
||
### Attributes | ||
|
||
### Disabled | ||
|
||
The `disabled` attribute specifies whether the control is disabled for user input. | ||
|
||
* Disabled controls will not get passed to the form processor. | ||
* Disabled controls do not receive focus. | ||
* Disabled controls are skipped in tabbing navigation. | ||
|
||
```jsx | ||
<FormGroup> | ||
<Textarea placeholder="[placeholder] Disabled textarea" disabled /> | ||
</FormGroup> | ||
<FormGroup> | ||
<Textarea value="[value] Disabled textarea" disabled /> | ||
</FormGroup> | ||
<Textarea placeholder="[placeholder] Disabled textarea" disabled /> | ||
<Textarea value="[value] Disabled textarea" disabled /> | ||
``` | ||
|
||
### Read-only | ||
|
||
The `readOnly` attribute specifies whether the control may be modified by the user. | ||
|
||
* Read-only controls will get passed to the form processor. | ||
* Read-only controls receive the focus but cannot be modified by the user. | ||
* Read-only controls are included in tabbing navigation. | ||
|
||
```jsx | ||
<FormGroup> | ||
<Textarea placeholder="[placeholder] Read-only textarea" readOnly /> | ||
</FormGroup> | ||
<FormGroup> | ||
<Textarea value="[value] Read-only textarea" readOnly /> | ||
</FormGroup> | ||
<Textarea placeholder="[placeholder] Read-only textarea" readOnly /> | ||
<Textarea value="[value] Read-only textarea" readOnly /> | ||
``` |
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