-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
US-969: Create new button components (#329)
* add avatar generator lib * add avatar icon to search domain screen * change white to light purple on choose alias screen * add avatar icon to request domain screen * add .rsk suffix automatically * add avatar icon for futher steps * add alias icon to header * change alias icon background to white * For better readability * check if profile.alias exists * show placeholder image when no alias * remove no valid message for alias length less than 5 chars * styles * does not allow small alias * swap minus and plus icons * remove duplicate dependency * create base input * add suffix * use text input props * apply fontSize to suffix * add padding to domain availabilty * encapsulate common attributes * use BaseInput in TextInputWithLabel * use TextInputWithLabel in ProfileCreateScreen * show digits only for phone input * lint * adjust suffix top * feedback labels to lower case * function call on press * use switch statement * create some enums * lint * add optional label * use useMemo to avoid re-computing * use useCallback on ProfileCreateScreen * fix * primary button pressed * remove fontWeight * add opacity when pressed * extract PurpleButton to PrimaryButton2 * disable request button when alias has already been taken * create secondary button * textPressed style * lint * create transfer button with LinearGradient * create ToggleButtons * remove ternary operations for better readability
- Loading branch information
1 parent
a24cbfb
commit f192f37
Showing
21 changed files
with
333 additions
and
112 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import React from 'react' | ||
import { StyleSheet } from 'react-native' | ||
import { colors } from '../../styles' | ||
import { Button, ButtonProps } from './ButtonVariations' | ||
|
||
export const PrimaryButton2: React.FC<ButtonProps> = props => ( | ||
<Button {...props} buttonStyles={styles} /> | ||
) | ||
|
||
const styles = StyleSheet.create({ | ||
button: { | ||
backgroundColor: colors.background.bustyBlue, | ||
}, | ||
buttonDisabled: { | ||
backgroundColor: colors.button.primary, | ||
opacity: 0.5, | ||
}, | ||
buttonActive: { | ||
backgroundColor: colors.button.primary, | ||
}, | ||
buttonPressed: { | ||
backgroundColor: colors.button.primaryPressed, | ||
opacity: 0.8, | ||
}, | ||
text: { | ||
color: colors.lightPurple, | ||
}, | ||
textDisabled: { | ||
color: colors.lightPurple, | ||
opacity: 0.5, | ||
}, | ||
textPressed: { | ||
color: colors.lightPurple, | ||
}, | ||
}) |
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 |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import React from 'react' | ||
import { StyleSheet } from 'react-native' | ||
import { colors } from '../../styles' | ||
import { Button, ButtonProps } from './ButtonVariations' | ||
|
||
export const SecondaryButton2: React.FC<ButtonProps> = props => ( | ||
<Button {...props} buttonStyles={styles} /> | ||
) | ||
|
||
const styles = StyleSheet.create({ | ||
button: { | ||
borderWidth: 1, | ||
borderColor: colors.lightPurple, | ||
backgroundColor: colors.background.darkBlue, | ||
}, | ||
buttonDisabled: { | ||
borderWidth: 1, | ||
borderColor: colors.lightPurple, | ||
backgroundColor: colors.background.darkBlue, | ||
opacity: 0.5, | ||
}, | ||
buttonActive: { | ||
backgroundColor: colors.button.secondary, | ||
}, | ||
buttonPressed: { | ||
borderWidth: 1, | ||
borderColor: colors.lightPurple, | ||
backgroundColor: colors.button.secondaryPressed, | ||
opacity: 0.8, | ||
}, | ||
text: { | ||
color: colors.lightPurple, | ||
}, | ||
textDisabled: { | ||
color: colors.lightPurple, | ||
opacity: 0.5, | ||
}, | ||
textPressed: { | ||
color: colors.button.secondary, | ||
}, | ||
}) |
Oops, something went wrong.