Skip to content

Commit

Permalink
remove inputActive and inputInactive constants
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigoncalves committed Mar 21, 2024
1 parent bf4c37a commit 70fe24e
Show file tree
Hide file tree
Showing 19 changed files with 36 additions and 35 deletions.
2 changes: 1 addition & 1 deletion src/components/InfoBox/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export const InfoBox = ({
description,
buttonText,
onPress,
backgroundColor = sharedColors.inputInactive,
backgroundColor = sharedColors.background.secondary,
avatarBackgroundColor = sharedColors.qrColor,
}: InfoBoxProps) => {
const [shouldHide, setShouldHide] = useState(false)
Expand Down
2 changes: 1 addition & 1 deletion src/components/accounts/AccountBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,7 @@ const styles = StyleSheet.create({
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
backgroundColor: sharedColors.inputInactive,
backgroundColor: sharedColors.background.secondary,
paddingLeft: 16,
paddingRight: 24,
marginTop: 12,
Expand Down
2 changes: 1 addition & 1 deletion src/components/appTouchable/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const AppTouchable = ({ children, style, width, ...props }: Props) => {
android_ripple={{
borderless: false,
foreground: true,
color: sharedColors.inputActive,
color: sharedColors.background.accent,
}}
{...props}>
{children}
Expand Down
2 changes: 1 addition & 1 deletion src/components/button/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,6 @@ const styles = StyleSheet.create({
paddingTop: 2,
}),
disabledButton: castStyle.view({
backgroundColor: sharedColors.inputActive,
backgroundColor: sharedColors.background.accent,
}),
})
2 changes: 1 addition & 1 deletion src/components/checkbox/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const styles = StyleSheet.create({
height: 16,
width: 16,
borderRadius: 4,
backgroundColor: sharedColors.inputInactive,
backgroundColor: sharedColors.background.secondary,
overflow: 'hidden',
}),
checkboxEnabled: castStyle.view({
Expand Down
10 changes: 5 additions & 5 deletions src/lib/rns/useProfileStatusColors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ export const useProfileStatusColors = () => {
case ProfileStatus.REQUESTING:
return {
startColor: sharedColors.warning,
endColor: sharedColors.inputActive,
endColor: sharedColors.background.accent,
}
case ProfileStatus.READY_TO_PURCHASE:
return {
startColor: sharedColors.successLight,
endColor: sharedColors.inputActive,
endColor: sharedColors.background.accent,
}
case ProfileStatus.PURCHASING:
return {
Expand All @@ -24,11 +24,11 @@ export const useProfileStatusColors = () => {
case ProfileStatus.REQUESTING_ERROR:
return {
startColor: sharedColors.danger,
endColor: sharedColors.inputActive,
endColor: sharedColors.background.accent,
}
}
return {
startColor: sharedColors.inputActive,
endColor: sharedColors.inputActive,
startColor: sharedColors.background.accent,
endColor: sharedColors.background.accent,
}
}
2 changes: 1 addition & 1 deletion src/navigation/contactsNavigator/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export const ContactsNavigation = ({
options={screenOptionsWithHeader(
top,
undefined,
sharedColors.inputInactive,
sharedColors.background.secondary,
)}
/>
</Stack.Navigator>
Expand Down
5 changes: 3 additions & 2 deletions src/screens/contacts/ContactDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ export const ContactDetails = ({
</AppTouchable>
),
headerStyle: {
backgroundColor: sharedColors.inputActive,
backgroundColor: sharedColors.background.accent,
},
headerRightContainerStyle: {
paddingTop: 0,
Expand Down Expand Up @@ -197,7 +197,8 @@ export const ContactDetails = ({
</Typography>
</View>
</View>
<BarButtonGroupContainer backgroundColor={sharedColors.inputActive}>
<BarButtonGroupContainer
backgroundColor={sharedColors.background.accent}>
<BarButtonGroupIcon
onPress={onSendToContact}
iconName={'north-east'}
Expand Down
2 changes: 1 addition & 1 deletion src/screens/contacts/components/ContactCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export const ContactCard = ({ name, style, onPress }: Props) => {

const styles = StyleSheet.create({
contactCard: castStyle.view({
backgroundColor: sharedColors.inputInactive,
backgroundColor: sharedColors.background.secondary,
paddingVertical: 13.5,
borderRadius: 10,
marginHorizontal: 5,
Expand Down
2 changes: 1 addition & 1 deletion src/screens/createKeys/import/ImportMasterKeyScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,7 @@ export const ImportMasterKeyScreen = (
activeColor={sharedColors.white}
activeDotWidth={8}
activeDotHeight={8}
passiveColor={sharedColors.inputActive}
passiveColor={sharedColors.background.accent}
passiveDotHeight={6}
passiveDotWidth={6}
marginHorizontal={6}
Expand Down
19 changes: 11 additions & 8 deletions src/screens/pinScreen/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -44,19 +44,19 @@ const defaultPin = [null, null, null, null]

// pin exist
const pinExistNoSteps = [
sharedColors.inputActive,
sharedColors.inputActive,
sharedColors.inputActive,
sharedColors.background.accent,
sharedColors.background.accent,
sharedColors.background.accent,
]
const pinExistFirstStep = [
sharedColors.successLight,
sharedColors.inputActive,
sharedColors.inputActive,
sharedColors.background.accent,
sharedColors.background.accent,
]
const pinExistSecondStep = [
sharedColors.successLight,
sharedColors.successLight,
sharedColors.inputActive,
sharedColors.background.accent,
]
const pinExistComplete = [
sharedColors.successLight,
Expand All @@ -65,10 +65,13 @@ const pinExistComplete = [
]

// no pin exist
const noPinExistNoSteps = [sharedColors.inputActive, sharedColors.inputActive]
const noPinExistNoSteps = [
sharedColors.background.accent,
sharedColors.background.accent,
]
const noPinExistFirstStep = [
sharedColors.successLight,
sharedColors.inputActive,
sharedColors.background.accent,
]
const noPinExistComplete = [
sharedColors.successLight,
Expand Down
2 changes: 1 addition & 1 deletion src/screens/profile/ProfileCreateScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export const ProfileCreateScreen = ({
</View>
</View>

<BarButtonGroupContainer backgroundColor={sharedColors.primaryDark}>
<BarButtonGroupContainer>
<BarButtonGroupIcon
iconName="qr-code"
IconComponent={MaterialIcon}
Expand Down
2 changes: 1 addition & 1 deletion src/screens/receive/ReceiveScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ export const ReceiveScreen = ({

const color = isSelected
? getTokenColor(asset.symbol)
: sharedColors.inputInactive
: sharedColors.background.secondary

return (
<PortfolioCard
Expand Down
2 changes: 1 addition & 1 deletion src/screens/rnsManager/AvatarIconBox.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export const AvatarIconBox = ({

const styles = StyleSheet.create({
avatarBoxViewStyle: castStyle.view({
backgroundColor: sharedColors.inputInactive,
backgroundColor: sharedColors.background.secondary,
alignItems: 'center',
paddingVertical: 30,
borderRadius: 20,
Expand Down
4 changes: 1 addition & 3 deletions src/screens/rnsManager/SearchDomainScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,7 @@ export const SearchDomainScreen = ({ navigation }: Props) => {
// it exists for ios but shows error https://reactnative.dev/docs/scrollview#automaticallyadjustkeyboardinsets-ios
automaticallyAdjustKeyboardInsets>
<View style={rnsManagerStyles.container}>
<Typography
type="h2"
style={[rnsManagerStyles.subtitle, rnsManagerStyles.marginBottom]}>
<Typography type="h2" style={rnsManagerStyles.marginBottom}>
{t('request_username_title')}
</Typography>
<AvatarIconBox text={(domain || '') + '.rsk'} />
Expand Down
2 changes: 1 addition & 1 deletion src/screens/rnsManager/rnsManagerStyles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const rnsManagerStyles = StyleSheet.create({
}),
profileImageContainer: castStyle.view({
alignItems: 'center',
backgroundColor: sharedColors.inputInactive,
backgroundColor: sharedColors.background.secondary,
borderRadius: 10,
paddingVertical: 20,
}),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,9 @@ export const TransactionSummaryComponent = ({
style={[
styles.summaryAlignment,
styles.statusContainer,
status ? { backgroundColor: sharedColors.inputInactive } : null,
status
? { backgroundColor: sharedColors.background.secondary }
: null,
]}>
<Typography type={'h4'}>
{status ? t('transaction_summary_status') : ''}
Expand Down
2 changes: 1 addition & 1 deletion src/screens/walletConnect/DappItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const DappItem = ({
const styles = StyleSheet.create({
container: castStyle.view({
flexDirection: 'row',
backgroundColor: sharedColors.inputInactive,
backgroundColor: sharedColors.background.secondary,
borderRadius: 10,
marginBottom: 12,
alignItems: 'center',
Expand Down
3 changes: 0 additions & 3 deletions src/shared/constants/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ export const sharedColors = {
danger: '#E94141',
dangerLight: '#ED6060',
white: '#FFFFFF',
inputInactive: '#252525',
inputActive: '#3A3A3A',
inputLabelColor: '#B8B8B8',
borderColor: '#575757',
labelLight: '#B8B8B8',
subTitle: '#FBFBFB',
Expand Down

0 comments on commit 70fe24e

Please sign in to comment.