-
-
Notifications
You must be signed in to change notification settings - Fork 296
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[studio] Explain props of text-field component with demos (#4012)
- Loading branch information
1 parent
e0aa2a2
commit 30d09b8
Showing
4 changed files
with
59 additions
and
3 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
docs/data/toolpad/studio/components/text-field/TextFieldIsRequired.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,14 @@ | ||
import * as React from 'react'; | ||
import { TextField } from '@toolpad/studio-components'; | ||
|
||
export default function TextFieldIsRequired() { | ||
return ( | ||
<TextField | ||
label="Name" | ||
size="small" | ||
placeholder="Enter name" | ||
isRequired | ||
sx={{ width: 280 }} | ||
/> | ||
); | ||
} |
14 changes: 14 additions & 0 deletions
14
docs/data/toolpad/studio/components/text-field/TextFieldMaxLength.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,14 @@ | ||
import * as React from 'react'; | ||
import { TextField } from '@toolpad/studio-components'; | ||
|
||
export default function TextFieldMaxLength() { | ||
return ( | ||
<TextField | ||
label="Zip code" | ||
size="small" | ||
maxLength="6" | ||
placeholder="Enter zip code" | ||
sx={{ width: 280 }} | ||
/> | ||
); | ||
} |
16 changes: 16 additions & 0 deletions
16
docs/data/toolpad/studio/components/text-field/TextFieldMinLength.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,16 @@ | ||
import * as React from 'react'; | ||
import { TextField } from '@toolpad/studio-components'; | ||
|
||
export default function TextFieldMinLength() { | ||
return ( | ||
<TextField | ||
label="Password" | ||
size="small" | ||
minLength="6" | ||
placeholder="Enter password" | ||
password | ||
isRequired | ||
sx={{ width: 280 }} | ||
/> | ||
); | ||
} |
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