Skip to content

Commit 427a33c

Browse files
authored
fix: fontWeight and fullWidth on marketplace screen (#1474)
Signed-off-by: clegirar <clemntgirard@gmail.com>
1 parent eb8745e commit 427a33c

File tree

13 files changed

+64
-121
lines changed

13 files changed

+64
-121
lines changed

packages/components/DropdownOption.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import { SVG } from "./SVG";
77
import { CustomPressable } from "./buttons/CustomPressable";
88
import { SpacerRow } from "./spacer";
99
import { secondaryColor } from "../utils/style/colors";
10-
import { fontSemibold14 } from "../utils/style/fonts";
10+
import { fontRegular14 } from "../utils/style/fonts";
1111
import { layout } from "../utils/style/layout";
1212

1313
interface DropdownOptionProps {
@@ -32,7 +32,7 @@ export const DropdownOption: React.FC<DropdownOptionProps> = ({
3232
<>
3333
<SVG source={icon} width={20} height={20} color={secondaryColor} />
3434
<SpacerRow size={1.5} />
35-
<BrandText style={fontSemibold14}>
35+
<BrandText style={fontRegular14}>
3636
{hovered && isComingSoon ? "Coming Soon" : label}
3737
</BrandText>
3838
</>

packages/components/ImageWithTextInsert.tsx

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import { View, ViewStyle, StyleProp, StyleSheet } from "react-native";
44
import { BrandText } from "./BrandText";
55
import { OptimizedImage } from "./OptimizedImage";
66

7+
import { fontRegular16 } from "@/utils/style/fonts";
8+
79
export const ImageWithTextInsert: React.FC<{
810
imageURL?: string;
911
textInsert?: string;
@@ -26,13 +28,15 @@ export const ImageWithTextInsert: React.FC<{
2628
/>
2729
{!!textInsert && (
2830
<BrandText
29-
style={{
30-
position: "absolute",
31-
fontSize: sourceSize * 0.063,
32-
right: padding,
33-
bottom: padding,
34-
maxWidth: sourceSize - padding,
35-
}}
31+
style={[
32+
fontRegular16,
33+
{
34+
position: "absolute",
35+
right: padding,
36+
bottom: padding,
37+
maxWidth: sourceSize - padding,
38+
},
39+
]}
3640
>
3741
{textInsert}
3842
</BrandText>

packages/components/SideFilters.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,7 @@ import {
6666
import {
6767
fontBold11,
6868
fontMedium14,
69+
fontRegular14,
6970
fontSemibold12,
7071
fontSemibold14,
7172
} from "../utils/style/fonts";
@@ -92,7 +93,7 @@ const Header: React.FC = () => {
9293
marginBottom: layout.spacing_x1,
9394
}}
9495
>
95-
<BrandText style={fontSemibold14}>Filters</BrandText>
96+
<BrandText style={fontRegular14}>Filters</BrandText>
9697
<TouchableOpacity
9798
containerStyle={[{ marginLeft: modalMarginPadding }]}
9899
style={{ justifyContent: "flex-end" }}
@@ -544,7 +545,7 @@ export const SideFilters: React.FC<{
544545
<View style={style}>
545546
<Header />
546547
<FilterContainer>
547-
<BrandText style={fontSemibold14}>Buy Now</BrandText>
548+
<BrandText style={fontRegular14}>Buy Now</BrandText>
548549
<Switch
549550
value={buyNow}
550551
onValueChange={() => {

packages/components/badges/TertiaryBadge.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import {
88
paddingHorizontalBadge,
99
} from "../../utils/style/badges";
1010
import { neutral33 } from "../../utils/style/colors";
11-
import { fontSemibold14 } from "../../utils/style/fonts";
11+
import { fontRegular14 } from "../../utils/style/fonts";
1212
import { layout } from "../../utils/style/layout";
1313
import { BrandText } from "../BrandText";
1414
import { SVG } from "../SVG";
@@ -34,7 +34,7 @@ export const TertiaryBadge: React.FC<{
3434
style,
3535
]}
3636
>
37-
<BrandText style={[fontSemibold14, { color: textColor }]}>
37+
<BrandText style={[fontRegular14, { color: textColor }]}>
3838
{label}
3939
</BrandText>
4040
{!!iconSVG && (

packages/components/buttons/SocialButtonSecondary.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import {
1313
primaryTextColor,
1414
withAlpha,
1515
} from "@/utils/style/colors";
16-
import { fontMedium14 } from "@/utils/style/fonts";
16+
import { fontRegular14 } from "@/utils/style/fonts";
1717

1818
export const SocialButtonSecondary: React.FC<{
1919
text?: string;
@@ -53,7 +53,7 @@ export const SocialButtonSecondary: React.FC<{
5353
{!!text && (
5454
<BrandText
5555
style={[
56-
fontMedium14,
56+
fontRegular14,
5757
{ color: primaryColor, marginLeft: innerGap },
5858
]}
5959
>

packages/components/collections/CollectionHeader.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import { contractExplorerLink, parseCollectionId } from "../../networks";
1515
import { prettyPrice } from "../../utils/coins";
1616
import { CollectionInfo } from "../../utils/collection";
1717
import { codGrayColor, neutral33 } from "../../utils/style/colors";
18-
import { fontSemibold28 } from "../../utils/style/fonts";
18+
import { fontRegular28 } from "../../utils/style/fonts";
1919
import { layout } from "../../utils/style/layout";
2020
import { BrandText } from "../BrandText";
2121
import { SocialButtonSecondary } from "../buttons/SocialButtonSecondary";
@@ -117,7 +117,7 @@ export const CollectionHeader: React.FC<{
117117
<View style={{ flex: 1 }}>
118118
<BrandText
119119
style={[
120-
fontSemibold28,
120+
fontRegular28,
121121
isMobile
122122
? {
123123
marginTop: layout.spacing_x1,

packages/components/collections/CollectionStat.tsx

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React from "react";
22
import { StyleSheet, View } from "react-native";
33

44
import { neutral22, neutralA3 } from "../../utils/style/colors";
5-
import { fontSemibold12, fontSemibold14 } from "../../utils/style/fonts";
5+
import { fontRegular12, fontRegular14 } from "../../utils/style/fonts";
66
import { layout } from "../../utils/style/layout";
77
import { BrandText } from "../BrandText";
88
import { CurrencyIcon } from "../CurrencyIcon";
@@ -36,11 +36,8 @@ export const CollectionStat = ({
3636
<View style={styles.rowCenter}>
3737
<BrandText
3838
style={[
39-
fontSemibold14,
40-
{
41-
lineHeight: 19,
42-
marginRight: layout.spacing_x0_5,
43-
},
39+
fontRegular14,
40+
{ lineHeight: 19, marginRight: layout.spacing_x0_5 },
4441
]}
4542
>
4643
{value}
@@ -70,12 +67,7 @@ const styles = StyleSheet.create({
7067
borderWidth: 1,
7168
borderColor: neutral22,
7269
},
73-
labelText: StyleSheet.flatten([
74-
fontSemibold12,
75-
{
76-
color: neutralA3,
77-
},
78-
]),
70+
labelText: StyleSheet.flatten([fontRegular12, { color: neutralA3 }]),
7971
rowCenter: {
8072
flexDirection: "row",
8173
justifyContent: "center",

packages/components/nfts/NFTView.tsx

Lines changed: 12 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,11 @@ import { nftBurnerUserCountQueryKey } from "@/hooks/nft-burner/useNFTBurnerUserC
5959
import { collectionStatsQueryKey } from "@/hooks/useCollectionStats";
6060
import { nftsQueryKey } from "@/hooks/useNFTs";
6161
import { getKeplrSigningCosmWasmClient } from "@/networks/signer";
62+
import {
63+
fontRegular10,
64+
fontRegular12,
65+
fontRegular14,
66+
} from "@/utils/style/fonts";
6267

6368
// NOTE: we put content in a memoized component to only rerender the container when the window width changes
6469

@@ -186,10 +191,7 @@ const NFTViewContent: React.FC<{
186191
}}
187192
/>
188193
<BrandText
189-
style={{
190-
fontSize: 14,
191-
marginBottom: 12,
192-
}}
194+
style={[fontRegular14, { marginBottom: 12 }]}
193195
ellipsizeMode="tail"
194196
numberOfLines={1}
195197
>
@@ -203,19 +205,12 @@ const NFTViewContent: React.FC<{
203205
}}
204206
>
205207
<View
206-
style={{
207-
flexDirection: "row",
208-
alignItems: "center",
209-
flex: 1,
210-
}}
208+
style={{ flexDirection: "row", alignItems: "center", flex: 1 }}
211209
>
212210
<NetworkIcon size={12} networkId={nft.networkId} />
213211
<BrandText
214212
numberOfLines={1}
215-
style={{
216-
fontSize: 12,
217-
marginLeft: layout.spacing_x1,
218-
}}
213+
style={[fontRegular12, { marginLeft: layout.spacing_x1 }]}
219214
>
220215
{nft.collectionName}
221216
</BrandText>
@@ -269,20 +264,10 @@ const NFTViewHeader: React.FC<{
269264
params: { id: nft.ownerId },
270265
}}
271266
>
272-
<BrandText
273-
style={{
274-
fontSize: 10,
275-
color: neutral77,
276-
}}
277-
>
267+
<BrandText style={[fontRegular10, { color: neutral77 }]}>
278268
Owned by
279269
</BrandText>
280-
<BrandText
281-
style={{
282-
fontSize: 12,
283-
lineHeight: 16,
284-
}}
285-
>
270+
<BrandText style={fontRegular12}>
286271
{userInfo.metadata?.tokenId ||
287272
shortUserAddressFromID(nft.ownerId, 10)}
288273
</BrandText>
@@ -463,22 +448,13 @@ const NFTViewFooter: React.FC<{ nft: NFT; localSelected: boolean }> = memo(
463448
/>
464449
{/* FIXME: should come from price denom */}
465450
<BrandText
466-
style={{
467-
fontSize: 12,
468-
color: neutral77,
469-
marginLeft: 10,
470-
}}
451+
style={[fontRegular12, { color: neutral77, marginLeft: 10 }]}
471452
>
472453
Price
473454
</BrandText>
474455
</>
475456
) : (
476-
<BrandText
477-
style={{
478-
fontSize: 12,
479-
color: neutral77,
480-
}}
481-
>
457+
<BrandText style={[fontRegular12, { color: neutral77 }]}>
482458
Not listed
483459
</BrandText>
484460
)}

packages/components/sorts/SortButton.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import chevronUpSVG from "../../../assets/icons/chevron-up.svg";
66
import sortSVG from "../../../assets/icons/sort.svg";
77
import { SortDirection } from "../../api/marketplace/v1/marketplace";
88
import { neutral11, secondaryColor } from "../../utils/style/colors";
9-
import { fontSemibold14 } from "../../utils/style/fonts";
9+
import { fontRegular14 } from "../../utils/style/fonts";
1010
import { BrandText } from "../BrandText";
1111
import { SVG } from "../SVG";
1212
import { LegacyTertiaryBox } from "../boxes/LegacyTertiaryBox";
@@ -55,7 +55,7 @@ export const SortButton: React.FC<{
5555
width={16}
5656
style={{ marginRight: 8 }}
5757
/>
58-
<BrandText style={fontSemibold14}>
58+
<BrandText style={fontRegular14}>
5959
Price{" "}
6060
{sortDirection === SortDirection.SORT_DIRECTION_ASCENDING
6161
? "Ascending"

packages/screens/Marketplace/CollectionScreen.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,7 @@ export const CollectionScreen: ScreenFC<"Collection"> = ({ route }) => {
5656
onBackPress={() => navigation.navigate("Marketplace")}
5757
forceNetworkId={network?.id}
5858
>
59-
<View
60-
style={{
61-
flexDirection: "row",
62-
flexWrap: "nowrap",
63-
}}
64-
>
59+
<View style={{ flexDirection: "row", flexWrap: "nowrap" }}>
6560
<ScrollView
6661
showsHorizontalScrollIndicator={false}
6762
contentContainerStyle={{

0 commit comments

Comments
 (0)