Skip to content

Commit

Permalink
Merge branch 'feat/cairo' of https://github.com/TERITORI/teritori-dapp
Browse files Browse the repository at this point in the history
…into feat/cairo
  • Loading branch information
hieu.ha committed Jan 15, 2025
2 parents c7e66df + 2de50fb commit c03be0a
Show file tree
Hide file tree
Showing 23 changed files with 157 additions and 284 deletions.
4 changes: 2 additions & 2 deletions packages/components/DropdownOption.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import { SVG } from "./SVG";
import { CustomPressable } from "./buttons/CustomPressable";
import { SpacerRow } from "./spacer";
import { secondaryColor } from "../utils/style/colors";
import { fontSemibold14 } from "../utils/style/fonts";
import { fontRegular14 } from "../utils/style/fonts";
import { layout } from "../utils/style/layout";

interface DropdownOptionProps {
Expand All @@ -32,7 +32,7 @@ export const DropdownOption: React.FC<DropdownOptionProps> = ({
<>
<SVG source={icon} width={20} height={20} color={secondaryColor} />
<SpacerRow size={1.5} />
<BrandText style={fontSemibold14}>
<BrandText style={fontRegular14}>
{hovered && isComingSoon ? "Coming Soon" : label}
</BrandText>
</>
Expand Down
18 changes: 11 additions & 7 deletions packages/components/ImageWithTextInsert.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { View, ViewStyle, StyleProp, StyleSheet } from "react-native";
import { BrandText } from "./BrandText";
import { OptimizedImage } from "./OptimizedImage";

import { fontRegular16 } from "@/utils/style/fonts";

export const ImageWithTextInsert: React.FC<{
imageURL?: string;
textInsert?: string;
Expand All @@ -26,13 +28,15 @@ export const ImageWithTextInsert: React.FC<{
/>
{!!textInsert && (
<BrandText
style={{
position: "absolute",
fontSize: sourceSize * 0.063,
right: padding,
bottom: padding,
maxWidth: sourceSize - padding,
}}
style={[
fontRegular16,
{
position: "absolute",
right: padding,
bottom: padding,
maxWidth: sourceSize - padding,
},
]}
>
{textInsert}
</BrandText>
Expand Down
4 changes: 2 additions & 2 deletions packages/components/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { PrimaryBox } from "./boxes/PrimaryBox";

import { useDropdowns } from "@/hooks/useDropdowns";
import { neutral33 } from "@/utils/style/colors";
import { fontSemibold13 } from "@/utils/style/fonts";
import { fontRegular13 } from "@/utils/style/fonts";
import { layout } from "@/utils/style/layout";

const DEFAULT_WIDTH = 164;
Expand Down Expand Up @@ -62,7 +62,7 @@ export const Menu: React.FC<MenuProps> = ({
]}
>
<BrandText
style={[fontSemibold13, item.disabled && { opacity: 0.5 }]}
style={[fontRegular13, item.disabled && { opacity: 0.5 }]}
>
{item.label}
</BrandText>
Expand Down
5 changes: 3 additions & 2 deletions packages/components/SideFilters.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ import {
import {
fontBold11,
fontMedium14,
fontRegular14,
fontSemibold12,
fontSemibold14,
} from "../utils/style/fonts";
Expand All @@ -92,7 +93,7 @@ const Header: React.FC = () => {
marginBottom: layout.spacing_x1,
}}
>
<BrandText style={fontSemibold14}>Filters</BrandText>
<BrandText style={fontRegular14}>Filters</BrandText>
<TouchableOpacity
containerStyle={[{ marginLeft: modalMarginPadding }]}
style={{ justifyContent: "flex-end" }}
Expand Down Expand Up @@ -544,7 +545,7 @@ export const SideFilters: React.FC<{
<View style={style}>
<Header />
<FilterContainer>
<BrandText style={fontSemibold14}>Buy Now</BrandText>
<BrandText style={fontRegular14}>Buy Now</BrandText>
<Switch
value={buyNow}
onValueChange={() => {
Expand Down
4 changes: 2 additions & 2 deletions packages/components/badges/TertiaryBadge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
paddingHorizontalBadge,
} from "../../utils/style/badges";
import { neutral33 } from "../../utils/style/colors";
import { fontSemibold14 } from "../../utils/style/fonts";
import { fontRegular14 } from "../../utils/style/fonts";
import { layout } from "../../utils/style/layout";
import { BrandText } from "../BrandText";
import { SVG } from "../SVG";
Expand All @@ -34,7 +34,7 @@ export const TertiaryBadge: React.FC<{
style,
]}
>
<BrandText style={[fontSemibold14, { color: textColor }]}>
<BrandText style={[fontRegular14, { color: textColor }]}>
{label}
</BrandText>
{!!iconSVG && (
Expand Down
4 changes: 2 additions & 2 deletions packages/components/buttons/MaxButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react";
import { Pressable, StyleSheet } from "react-native";

import { neutral22, primaryColor } from "../../utils/style/colors";
import { fontSemibold12 } from "../../utils/style/fonts";
import { fontRegular12 } from "../../utils/style/fonts";
import { layout } from "../../utils/style/layout";
import { BrandText } from "../BrandText";

Expand All @@ -22,7 +22,7 @@ export const MaxButton = ({ onPress }: MaxButtonProps) => {
// eslint-disable-next-line no-restricted-syntax
const styles = StyleSheet.create({
maxText: {
...StyleSheet.flatten(fontSemibold12),
...StyleSheet.flatten(fontRegular12),
backgroundColor: primaryColor,
color: neutral22,
borderRadius: layout.borderRadius,
Expand Down
4 changes: 2 additions & 2 deletions packages/components/buttons/SocialButtonSecondary.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
primaryTextColor,
withAlpha,
} from "@/utils/style/colors";
import { fontMedium14 } from "@/utils/style/fonts";
import { fontRegular14 } from "@/utils/style/fonts";

export const SocialButtonSecondary: React.FC<{
text?: string;
Expand Down Expand Up @@ -53,7 +53,7 @@ export const SocialButtonSecondary: React.FC<{
{!!text && (
<BrandText
style={[
fontMedium14,
fontRegular14,
{ color: primaryColor, marginLeft: innerGap },
]}
>
Expand Down
4 changes: 2 additions & 2 deletions packages/components/collections/CollectionHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import { contractExplorerLink, parseCollectionId } from "../../networks";
import { prettyPrice } from "../../utils/coins";
import { CollectionInfo } from "../../utils/collection";
import { codGrayColor, neutral33 } from "../../utils/style/colors";
import { fontSemibold28 } from "../../utils/style/fonts";
import { fontRegular28 } from "../../utils/style/fonts";
import { layout } from "../../utils/style/layout";
import { BrandText } from "../BrandText";
import { SocialButtonSecondary } from "../buttons/SocialButtonSecondary";
Expand Down Expand Up @@ -117,7 +117,7 @@ export const CollectionHeader: React.FC<{
<View style={{ flex: 1 }}>
<BrandText
style={[
fontSemibold28,
fontRegular28,
isMobile
? {
marginTop: layout.spacing_x1,
Expand Down
16 changes: 4 additions & 12 deletions packages/components/collections/CollectionStat.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from "react";
import { StyleSheet, View } from "react-native";

import { neutral22, neutralA3 } from "../../utils/style/colors";
import { fontSemibold12, fontSemibold14 } from "../../utils/style/fonts";
import { fontRegular12, fontRegular14 } from "../../utils/style/fonts";
import { layout } from "../../utils/style/layout";
import { BrandText } from "../BrandText";
import { CurrencyIcon } from "../CurrencyIcon";
Expand Down Expand Up @@ -36,11 +36,8 @@ export const CollectionStat = ({
<View style={styles.rowCenter}>
<BrandText
style={[
fontSemibold14,
{
lineHeight: 19,
marginRight: layout.spacing_x0_5,
},
fontRegular14,
{ lineHeight: 19, marginRight: layout.spacing_x0_5 },
]}
>
{value}
Expand Down Expand Up @@ -70,12 +67,7 @@ const styles = StyleSheet.create({
borderWidth: 1,
borderColor: neutral22,
},
labelText: StyleSheet.flatten([
fontSemibold12,
{
color: neutralA3,
},
]),
labelText: StyleSheet.flatten([fontRegular12, { color: neutralA3 }]),
rowCenter: {
flexDirection: "row",
justifyContent: "center",
Expand Down
29 changes: 9 additions & 20 deletions packages/components/hub/MyNFTs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import { OmniLink } from "../OmniLink";
import { SVG } from "../SVG";
import { NFTView } from "../nfts/NFTView";

import { fontRegular14, fontRegular20 } from "@/utils/style/fonts";

export const MyNFTs: React.FC = () => {
const selectedWallet = useSelectedWallet();

Expand All @@ -25,11 +27,7 @@ export const MyNFTs: React.FC = () => {
priceRange: undefined,
});
return (
<View
style={{
paddingTop: 32,
}}
>
<View style={{ paddingTop: 32 }}>
<View
style={{
flexDirection: "row",
Expand All @@ -38,33 +36,24 @@ export const MyNFTs: React.FC = () => {
marginBottom: 24,
}}
>
<BrandText style={{ marginRight: 20, fontSize: 20 }}>My NFTs</BrandText>
<BrandText style={[fontRegular20, { marginRight: 20 }]}>
My NFTs
</BrandText>
<OmniLink
to={{
screen: "MyCollection",
}}
to={{ screen: "MyCollection" }}
style={{
display: "flex",
flexDirection: "row",
alignItems: "center",
}}
>
<BrandText
style={{
fontSize: 14,
marginRight: 16,
}}
>
<BrandText style={[fontRegular14, { marginRight: 16 }]}>
See All
</BrandText>
<SVG source={chevronRightSVG} height={16} />
</OmniLink>
</View>
<View
style={{
flexDirection: "row",
}}
>
<View style={{ flexDirection: "row" }}>
<FlatList
data={nfts}
horizontal
Expand Down
55 changes: 14 additions & 41 deletions packages/components/hub/WalletDashboardHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ import { LegacyTertiaryBox } from "../boxes/LegacyTertiaryBox";
import { PrimaryButton } from "../buttons/PrimaryButton";

import { useAppNavigation } from "@/hooks/navigation/useAppNavigation";
import {
fontRegular12,
fontRegular13,
fontRegular16,
fontRegular20,
} from "@/utils/style/fonts";

interface WalletDashboardHeaderProps {
title: string;
Expand All @@ -38,12 +44,8 @@ const WalletDashboardHeaderCard: React.FC<WalletDashboardHeaderProps> = ({
<LegacyTertiaryBox
height={116}
width={200}
mainContainerStyle={{
backgroundColor: neutral17,
}}
style={{
marginLeft: 16,
}}
mainContainerStyle={{ backgroundColor: neutral17 }}
style={{ marginLeft: 16 }}
>
<View
style={{
Expand All @@ -56,31 +58,15 @@ const WalletDashboardHeaderCard: React.FC<WalletDashboardHeaderProps> = ({
position: "relative",
}}
>
<BrandText
style={{
fontSize: 12,
}}
>
{title}
</BrandText>
<BrandText
style={{
fontSize: 16,
}}
>
{data}
</BrandText>
<BrandText style={fontRegular12}>{title}</BrandText>
<BrandText style={fontRegular16}>{data}</BrandText>
{!!actionButton && (
<PrimaryButton
disabled={actionButton.disabled}
size="XS"
text={actionButton.label}
onPress={actionButton.onPress}
touchableStyle={{
position: "absolute",
bottom: 12,
right: 14,
}}
touchableStyle={{ position: "absolute", bottom: 12, right: 14 }}
/>
)}
</View>
Expand Down Expand Up @@ -129,12 +115,7 @@ export const WalletDashboardHeader: React.FC = () => {
marginTop: -layout.spacing_x3,
}}
>
<View
style={{
flexDirection: "row",
marginTop: layout.spacing_x3,
}}
>
<View style={{ flexDirection: "row", marginTop: layout.spacing_x3 }}>
<TouchableOpacity
style={{
backgroundColor: neutral22,
Expand All @@ -150,19 +131,11 @@ export const WalletDashboardHeader: React.FC = () => {
<SVG width={24} height={24} source={penSVG} />
</TouchableOpacity>
<View>
<BrandText
style={{
color: neutralA3,
fontSize: 14,
}}
>
<BrandText style={[fontRegular13, { color: neutralA3 }]}>
Hello
</BrandText>
<BrandText
style={{
fontSize: 20,
maxWidth: 324,
}}
style={[fontRegular20, { maxWidth: 324 }]}
numberOfLines={1}
>
{userInfo.metadata?.tokenId ||
Expand Down
Loading

0 comments on commit c03be0a

Please sign in to comment.