-
Notifications
You must be signed in to change notification settings - Fork 299
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add flex to input examples so they copy correctly (#4397)
- Loading branch information
1 parent
e274c3e
commit f3903bf
Showing
13 changed files
with
134 additions
and
91 deletions.
There are no files selected for viewing
6 changes: 3 additions & 3 deletions
6
docs/src/pages/[platform]/components/input/examples/DefaultInputExample.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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import { Input, Label } from '@aws-amplify/ui-react'; | ||
import { Input, Label, Flex } from '@aws-amplify/ui-react'; | ||
|
||
export const DefaultInputExample = () => ( | ||
<> | ||
<Flex direction="column" gap="small"> | ||
<Label htmlFor="first_name">First Name:</Label> | ||
<Input id="first_name" name="first_name" /> | ||
</> | ||
</Flex> | ||
); |
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
49 changes: 27 additions & 22 deletions
49
docs/src/pages/[platform]/components/input/examples/InputStylePropsExample.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 |
---|---|---|
@@ -1,30 +1,35 @@ | ||
import { Text, Input, Label, useTheme } from '@aws-amplify/ui-react'; | ||
import { Text, Input, Label, useTheme, Flex } from '@aws-amplify/ui-react'; | ||
|
||
export const InputStylePropsExample = () => { | ||
const { tokens } = useTheme(); | ||
return ( | ||
<> | ||
<Label htmlFor="name"> | ||
<Text | ||
<Flex direction="column"> | ||
<Flex direction="column" gap="small"> | ||
<Label htmlFor="name"> | ||
<Text | ||
fontWeight={tokens.fontWeights.bold} | ||
fontSize={tokens.fontSizes.xl} | ||
> | ||
Name: | ||
</Text> | ||
</Label> | ||
<Input | ||
id="name" | ||
fontWeight={tokens.fontWeights.bold} | ||
fontSize={tokens.fontSizes.xl} | ||
> | ||
Name: | ||
</Text> | ||
</Label> | ||
<Input | ||
id="name" | ||
fontWeight={tokens.fontWeights.bold} | ||
fontSize={tokens.fontSizes.xl} | ||
padding="xl" | ||
border={`1px solid ${tokens.colors.brand.primary[60]}`} | ||
/> | ||
<Label htmlFor="special">Special Field</Label> | ||
<Input | ||
id="special" | ||
backgroundColor="brand.primary.10" | ||
border={`1px solid ${tokens.colors.brand.primary[60]}`} | ||
/> | ||
</> | ||
padding="xl" | ||
border={`1px solid ${tokens.colors.brand.primary[60]}`} | ||
/> | ||
</Flex> | ||
|
||
<Flex direction="column" gap="small"> | ||
<Label htmlFor="special">Special Field</Label> | ||
<Input | ||
id="special" | ||
backgroundColor="brand.primary.10" | ||
border={`1px solid ${tokens.colors.brand.primary[60]}`} | ||
/> | ||
</Flex> | ||
</Flex> | ||
); | ||
}; |
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
18 changes: 11 additions & 7 deletions
18
docs/src/pages/[platform]/components/input/examples/InputVariationExample.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 |
---|---|---|
@@ -1,12 +1,16 @@ | ||
import { Input, Label } from '@aws-amplify/ui-react'; | ||
import { Flex, Input, Label } from '@aws-amplify/ui-react'; | ||
|
||
export const InputVariationExample = () => { | ||
return ( | ||
<> | ||
<Label htmlFor="Default">Default</Label> | ||
<Input id="default" /> | ||
<Label htmlFor="Quiet">Default</Label> | ||
<Input id="quiet" variation="quiet" /> | ||
</> | ||
<Flex direction="column"> | ||
<Flex direction="column" gap="small"> | ||
<Label htmlFor="Default">Default</Label> | ||
<Input id="default" /> | ||
</Flex> | ||
<Flex direction="column" gap="small"> | ||
<Label htmlFor="Quiet">Default</Label> | ||
<Input id="quiet" variation="quiet" /> | ||
</Flex> | ||
</Flex> | ||
); | ||
}; |
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
6 changes: 3 additions & 3 deletions
6
docs/src/pages/[platform]/components/label/examples/AccessibilityExample.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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import { Input, Label } from '@aws-amplify/ui-react'; | ||
import { Flex, Input, Label } from '@aws-amplify/ui-react'; | ||
|
||
export const AccessibilityExample = () => ( | ||
<> | ||
<Flex direction="column" gap="small"> | ||
<Label htmlFor="departure">Departure date</Label> | ||
<Input id="departure" type="date" /> | ||
</> | ||
</Flex> | ||
); |
6 changes: 3 additions & 3 deletions
6
docs/src/pages/[platform]/components/label/examples/DefaultLabelExample.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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import { Input, Label } from '@aws-amplify/ui-react'; | ||
import { Flex, Input, Label } from '@aws-amplify/ui-react'; | ||
|
||
export const DefaultLabelExample = () => ( | ||
<> | ||
<Flex direction="column" gap="small"> | ||
<Label htmlFor="first_name">First Name:</Label> | ||
<Input id="first_name" name="first_name" /> | ||
</> | ||
</Flex> | ||
); |