-
Notifications
You must be signed in to change notification settings - Fork 317
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Joe Buono
committed
Nov 22, 2022
1 parent
fa52664
commit 3bff7ff
Showing
4 changed files
with
54 additions
and
5 deletions.
There are no files selected for viewing
2 changes: 0 additions & 2 deletions
2
...omponents/authenticator/customization/customization.labels-and-text.flutter.mdx
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
51 changes: 51 additions & 0 deletions
51
...ents/authenticator/customization/customization.labels-and-text.react-native.mdx
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,51 @@ | ||
import { Expander, ExpanderItem, Text } from '@aws-amplify/ui-react'; | ||
|
||
Using the same techniques as [Internationalization (I18n)](#internationalization-i18n), you can customize the labels and text of the components: | ||
|
||
<Expander type="single" isCollapsible> | ||
<ExpanderItem title={<Text fontWeight="bold">Sign In</Text>} value="sign-in"> | ||
```js | ||
I18n.putVocabulariesForLanguage('en', { | ||
'Sign In': 'Login', // Tab header | ||
'Sign in': 'Log in', // Button label | ||
'Sign in to your account': 'Welcome Back!', | ||
Username: 'Enter your username', // Username label | ||
Password: 'Enter your password', // Password label | ||
'Forgot your password?': 'Reset Password', | ||
}); | ||
``` | ||
</ExpanderItem> | ||
|
||
<ExpanderItem title={<Text fontWeight="bold">Sign Up</Text>} value="sign-up"> | ||
```js | ||
I18n.putVocabulariesForLanguage('en', { | ||
'Create Account': 'Register', // Link text | ||
'Create a new account': 'New User', // Header text | ||
'Confirm Password': 'Confirm your password', // Confirm Password label | ||
Email: 'Enter your email', | ||
'Phone Number': 'Enter your phone number', | ||
}); | ||
``` | ||
</ExpanderItem> | ||
|
||
<ExpanderItem title={<Text fontWeight="bold">Reset Password</Text>} value="reset-password"> | ||
```js | ||
I18n.putVocabulariesForLanguage('en', { | ||
'Reset your password': 'Forgot your password?', | ||
'Enter your username': 'Username or Email', | ||
'Send code': 'Reset my password', | ||
'Back to Sign In': 'Back to Login', | ||
}); | ||
``` | ||
</ExpanderItem> | ||
|
||
<ExpanderItem title={<Text fontWeight="bold">Setup TOTP</Text>} value="setup-totp"> | ||
```js | ||
I18n.putVocabulariesForLanguage('en', { | ||
Code: '2FA Code', | ||
Confirm: 'Confirm 2FA', | ||
'Back to Sign In': 'Back to Login', | ||
}); | ||
``` | ||
</ExpanderItem> | ||
</Expander> |
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