Skip to content

Commit

Permalink
feat: refactoring theme styles (#1137)
Browse files Browse the repository at this point in the history
Signed-off-by: Sophia Sales <[email protected]>
Co-authored-by: Sophia Sales <[email protected]>
  • Loading branch information
SophiaSales and Sophia Sales authored May 16, 2024
1 parent b809b6a commit 9b8c48c
Show file tree
Hide file tree
Showing 14 changed files with 20 additions and 34 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const ProofCancelModal: React.FC<ProofCancelModalProps> = ({ visible, onDone })
justifyContent: 'space-around',
},
heading: {
...TextTheme.modalHeadingOne,
...TextTheme.modalTitle,
marginTop: 60,
marginBottom: 30,
textAlign: 'center',
Expand All @@ -45,7 +45,6 @@ const ProofCancelModal: React.FC<ProofCancelModalProps> = ({ visible, onDone })
},
subtext: {
...TextTheme.modalNormal,
fontSize: 22,
textAlign: 'center',
},
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,6 @@ const FauxNavigationBar: React.FC<FauxNavigationBarProps> = ({ title, onHomeTouc
},
label: {
...TextTheme.bold,
color: ColorPallet.brand.headerText,
fontSize: 17,
flexGrow: 1,
textAlign: 'center',
paddingBottom: 12,
Expand Down
4 changes: 0 additions & 4 deletions packages/legacy/core/App/screens/ListProofRequests.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,24 +39,20 @@ const ProofRequestsCard: React.FC<ProofRequestsCardProps> = ({ navigation, templ
},
templateTitle: {
...ListItems.requestTemplateTitle,
fontSize: 16,
marginBottom: 4,
},
templateDetails: {
...ListItems.requestTemplateDetails,
fontSize: 16,
marginBottom: 4,
},
templateZkpLabel: {
...ListItems.requestTemplateZkpLabel,
fontSize: 12,
},
iconContainer: {
alignSelf: 'center',
},
icon: {
...ListItems.requestTemplateIcon,
fontSize: 36,
},
})

Expand Down
4 changes: 2 additions & 2 deletions packages/legacy/core/App/screens/OnboardingPages.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ const customPages = (onTutorialCompleted: GenericFn, OnboardingTheme: any) => {
<SecureImage {...imageDisplayOptions} />
</View>
<View style={{ marginBottom: 20 }}>
<Text style={[styles.headerText, { fontSize: 18 }]} testID={testIdWithKey('HeaderText')}>
<Text style={[styles.headerText]} testID={testIdWithKey('HeaderText')}>
Ornare suspendisse sed nisi lacus
</Text>
<Text style={[styles.bodyText, { marginTop: 25 }]} testID={testIdWithKey('BodyText')}>
Expand Down Expand Up @@ -144,7 +144,7 @@ export const createPageWith = (
const styles = createStyles(OnboardingTheme)
const imageDisplayOptions = createImageDisplayOptions(OnboardingTheme)
const titleElement = (
<Text style={[styles.headerText, { fontSize: 18 }]} testID={testIdWithKey('HeaderText')}>
<Text style={[styles.headerText]} testID={testIdWithKey('HeaderText')}>
{title}
</Text>
)
Expand Down
3 changes: 1 addition & 2 deletions packages/legacy/core/App/screens/ProofDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ const VerifiedProof: React.FC<VerifiedProofProps> = ({
marginVertical: 30,
},
descriptionText: {
fontSize: 18,
color: TextTheme.normal.color,
...TextTheme.normal,
},
label: {
fontWeight: TextTheme.bold.fontWeight,
Expand Down
4 changes: 1 addition & 3 deletions packages/legacy/core/App/screens/ProofRequestDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,7 @@ const ProofRequestDetails: React.FC<ProofRequestDetailsProps> = ({ route, naviga
marginBottom: 36,
},
title: {
color: TextTheme.title.color,
fontSize: 28,
fontWeight: TextTheme.bold.fontWeight,
...TextTheme.headerTitle,
},
description: {
marginTop: 10,
Expand Down
3 changes: 0 additions & 3 deletions packages/legacy/core/App/screens/ProofRequestUsageHistory.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ const ProofRequestUsageHistoryRecord: React.FC<ProofRequestUsageHistoryRecordPro
},
valueText: {
...ListItems.requestTemplateTitle,
fontSize: 16,
marginLeft: 4,
},
rightContainer: {
Expand All @@ -81,11 +80,9 @@ const ProofRequestUsageHistoryRecord: React.FC<ProofRequestUsageHistoryRecordPro
},
icon: {
...ListItems.requestTemplateIcon,
fontSize: 36,
},
date: {
...ListItems.requestTemplateDate,
fontSize: 10,
},
})

Expand Down
3 changes: 1 addition & 2 deletions packages/legacy/core/App/screens/ProofRequesting.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,8 +90,7 @@ const ProofRequesting: React.FC<ProofRequestingProps> = ({ route, navigation })
color: ColorPallet.grayscale.black,
},
secondaryHeaderText: {
fontWeight: TextTheme.normal.fontWeight,
fontSize: 20,
...TextTheme.normal,
textAlign: 'center',
marginTop: 8,
color: ColorPallet.grayscale.black,
Expand Down
7 changes: 6 additions & 1 deletion packages/legacy/core/App/theme.ts
Original file line number Diff line number Diff line change
Expand Up @@ -539,19 +539,24 @@ export const ListItems = StyleSheet.create({
requestTemplateTitle: {
color: ColorPallet.grayscale.black,
fontWeight: 'bold',
fontSize: 16,
},
requestTemplateDetails: {
color: ColorPallet.grayscale.black,
fontWeight: 'normal',
fontSize: 16,
},
requestTemplateZkpLabel: {
color: ColorPallet.grayscale.mediumGrey,
fontSize: 12,
},
requestTemplateIcon: {
color: ColorPallet.grayscale.black,
fontSize: 36,
},
requestTemplateDate: {
color: ColorPallet.grayscale.mediumGrey,
fontSize: 10,
},
})

Expand Down Expand Up @@ -757,7 +762,7 @@ export const OnboardingTheme = {
},
headerTintColor: ColorPallet.grayscale.white,
headerText: {
...TextTheme.headingTwo,
...TextTheme.bold,
},
bodyText: {
...TextTheme.normal,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Array [
Object {
"color": "#FFFFFF",
"flexGrow": 1,
"fontSize": 17,
"fontSize": 18,
"fontWeight": "bold",
"paddingBottom": 12,
"textAlign": "center",
Expand Down Expand Up @@ -147,7 +147,7 @@ Array [
Object {
"color": "#FFFFFF",
"flexGrow": 1,
"fontSize": 17,
"fontSize": 18,
"fontWeight": "bold",
"paddingBottom": 12,
"textAlign": "center",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ exports[`ProofCancelModal Component Rerenders correctly when not visible 1`] = `
style={
Object {
"color": "#FFFFFF",
"fontSize": 38,
"fontSize": 24,
"fontWeight": "bold",
"marginBottom": 30,
"marginTop": 60,
Expand All @@ -57,7 +57,7 @@ exports[`ProofCancelModal Component Rerenders correctly when not visible 1`] = `
style={
Object {
"color": "#FFFFFF",
"fontSize": 22,
"fontSize": 18,
"fontWeight": "normal",
"textAlign": "center",
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,6 @@ exports[`Onboarding Onboarding Developer mode 1`] = `
style={
Array [
Object {},
Object {
"fontSize": 18,
},
]
}
testID="com.ariesbifold:id/HeaderText"
Expand Down Expand Up @@ -207,9 +204,6 @@ exports[`Onboarding Onboarding Developer mode 1`] = `
style={
Array [
Object {},
Object {
"fontSize": 18,
},
]
}
testID="com.ariesbifold:id/DeveloperModeTouch"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -847,6 +847,7 @@ exports[`ProofDetails Component with a verified proof record renders correctly w
Object {
"color": "#FFFFFF",
"fontSize": 18,
"fontWeight": "normal",
}
}
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ exports[`ProofRequesting Component generate new qr works correctly 1`] = `
style={
Object {
"color": "#000000",
"fontSize": 20,
"fontSize": 18,
"fontWeight": "normal",
"marginTop": 8,
"textAlign": "center",
Expand Down Expand Up @@ -296,7 +296,7 @@ exports[`ProofRequesting Component renders correctly 1`] = `
style={
Object {
"color": "#000000",
"fontSize": 20,
"fontSize": 18,
"fontWeight": "normal",
"marginTop": 8,
"textAlign": "center",
Expand Down Expand Up @@ -449,7 +449,7 @@ exports[`ProofRequesting Component renders correctly 2`] = `
style={
Object {
"color": "#000000",
"fontSize": 20,
"fontSize": 18,
"fontWeight": "normal",
"marginTop": 8,
"textAlign": "center",
Expand Down

0 comments on commit 9b8c48c

Please sign in to comment.