forked from aws-amplify/amplify-ui
-
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.
docs: updating StepperField docs (aws-amplify#1169)
* docs: updating StepperField docs * chore: updating description
- Loading branch information
Showing
20 changed files
with
324 additions
and
311 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
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
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
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
14 changes: 14 additions & 0 deletions
14
docs/src/pages/components/stepperfield/examples/DefaultStepperFieldExample.tsx
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 { StepperField } from '@aws-amplify/ui-react'; | ||
|
||
export const DefaultStepperFieldExample = () => { | ||
return ( | ||
<StepperField | ||
label="Stepper" | ||
defaultValue={0} | ||
min={0} | ||
max={10} | ||
step={1} | ||
labelHidden | ||
/> | ||
); | ||
}; |
15 changes: 15 additions & 0 deletions
15
docs/src/pages/components/stepperfield/examples/DisabledStepperFieldExample.tsx
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,15 @@ | ||
import { StepperField } from '@aws-amplify/ui-react'; | ||
|
||
export const DisabledStepperFieldExample = () => { | ||
return ( | ||
<StepperField | ||
label="Stepper" | ||
defaultValue={0} | ||
min={0} | ||
max={10} | ||
step={1} | ||
labelHidden | ||
isDisabled | ||
/> | ||
); | ||
}; |
15 changes: 15 additions & 0 deletions
15
docs/src/pages/components/stepperfield/examples/ReadOnlyStepperFieldExample.tsx
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,15 @@ | ||
import { StepperField } from '@aws-amplify/ui-react'; | ||
|
||
export const ReadOnlyStepperFieldExample = () => { | ||
return ( | ||
<StepperField | ||
label="Stepper" | ||
defaultValue={5} | ||
min={0} | ||
max={10} | ||
step={1} | ||
labelHidden | ||
isReadOnly | ||
/> | ||
); | ||
}; |
7 changes: 7 additions & 0 deletions
7
docs/src/pages/components/stepperfield/examples/StepperFieldAccessibilityExample.tsx
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,7 @@ | ||
import { StepperField } from '@aws-amplify/ui-react'; | ||
|
||
export const StepperFieldAccessibilityExample = () => { | ||
return ( | ||
<StepperField label="Stepper" defaultValue={0} min={0} max={10} step={1} /> | ||
); | ||
}; |
34 changes: 34 additions & 0 deletions
34
docs/src/pages/components/stepperfield/examples/StepperFieldSizeExample.tsx
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,34 @@ | ||
import { StepperField } from '@aws-amplify/ui-react'; | ||
|
||
export const StepperFieldSizeExample = () => { | ||
return ( | ||
<> | ||
<StepperField | ||
label="Stepper" | ||
defaultValue={0} | ||
min={0} | ||
max={10} | ||
step={1} | ||
size="small" | ||
labelHidden | ||
/> | ||
<StepperField | ||
label="Stepper" | ||
defaultValue={0} | ||
min={0} | ||
max={10} | ||
step={1} | ||
labelHidden | ||
/> | ||
<StepperField | ||
label="Stepper" | ||
defaultValue={0} | ||
min={0} | ||
max={10} | ||
step={1} | ||
size="large" | ||
labelHidden | ||
/> | ||
</> | ||
); | ||
}; |
18 changes: 18 additions & 0 deletions
18
docs/src/pages/components/stepperfield/examples/StepperFieldStylePropsExample.tsx
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,18 @@ | ||
import { StepperField, useTheme } from '@aws-amplify/ui-react'; | ||
|
||
export const StepperFieldStylePropsExample = () => { | ||
const { tokens } = useTheme(); | ||
return ( | ||
<StepperField | ||
label="Stepper" | ||
defaultValue={0} | ||
min={0} | ||
max={10} | ||
step={1} | ||
backgroundColor={tokens.colors.teal[60]} | ||
border={`1px solid ${tokens.colors.teal[60]}`} | ||
color={tokens.colors.white} | ||
labelHidden | ||
/> | ||
); | ||
}; |
16 changes: 16 additions & 0 deletions
16
docs/src/pages/components/stepperfield/examples/StepperFieldValidationErrorExample.tsx
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 { StepperField } from '@aws-amplify/ui-react'; | ||
|
||
export const StepperFieldValidationErrorExample = () => { | ||
return ( | ||
<StepperField | ||
label="Stepper" | ||
defaultValue={0} | ||
min={0} | ||
max={10} | ||
step={1} | ||
errorMessage="The is an error message." | ||
hasError | ||
labelHidden | ||
/> | ||
); | ||
}; |
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,8 @@ | ||
export { ControlledStepperFieldExample } from './ControlledStepperFieldExample'; | ||
export { DefaultStepperFieldExample } from './DefaultStepperFieldExample'; | ||
export { DisabledStepperFieldExample } from './DisabledStepperFieldExample'; | ||
export { ReadOnlyStepperFieldExample } from './ReadOnlyStepperFieldExample'; | ||
export { StepperFieldAccessibilityExample } from './StepperFieldAccessibilityExample'; | ||
export { StepperFieldSizeExample } from './StepperFieldSizeExample'; | ||
export { StepperFieldStylePropsExample } from './StepperFieldStylePropsExample'; | ||
export { StepperFieldValidationErrorExample } from './StepperFieldValidationErrorExample'; |
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.