Skip to content

Commit

Permalink
fix: font weight multisig screen (#1493)
Browse files Browse the repository at this point in the history
Signed-off-by: clegirar <[email protected]>
  • Loading branch information
clegirar authored Jan 15, 2025
1 parent 871f2cc commit 6c21199
Show file tree
Hide file tree
Showing 12 changed files with 59 additions and 96 deletions.
4 changes: 2 additions & 2 deletions packages/components/EmptyList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { AnimationFadeIn } from "./animations/AnimationFadeIn";
import { SpacerColumn } from "./spacer";
import emptyListSVG from "../../assets/icons/empty-list.svg";
import { neutral77 } from "../utils/style/colors";
import { fontSemibold16 } from "../utils/style/fonts";
import { fontRegular16 } from "../utils/style/fonts";

interface EmptyListProps {
text: string;
Expand All @@ -24,7 +24,7 @@ export const EmptyList: React.FC<EmptyListProps> = ({ text, size = 250 }) => {
>
<SVG source={emptyListSVG} width={size} height={size} />
<SpacerColumn size={2} />
<BrandText style={[fontSemibold16, { color: neutral77 }]}>
<BrandText style={[fontRegular16, { color: neutral77 }]}>
{text}
</BrandText>
</AnimationFadeIn>
Expand Down
9 changes: 3 additions & 6 deletions packages/components/ErrorText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Animated, {

import { BrandText } from "./BrandText";
import { errorColor } from "../utils/style/colors";
import { fontSemibold14 } from "../utils/style/fonts";
import { fontRegular14 } from "../utils/style/fonts";

interface ErrorTextProps extends TextProps {
center?: boolean;
Expand Down Expand Up @@ -66,10 +66,7 @@ export const ErrorText: React.FC<ErrorTextProps> = ({
// eslint-disable-next-line no-restricted-syntax
const styles = StyleSheet.create({
text: StyleSheet.flatten([
fontSemibold14,
{
marginTop: 6,
color: errorColor,
},
fontRegular14,
{ marginTop: 6, color: errorColor },
]),
});
14 changes: 3 additions & 11 deletions packages/components/inputs/TextInputOutsideLabel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { TextStyle, View, ViewStyle } from "react-native";

import asteriskSignSVG from "../../../assets/icons/asterisk-sign.svg";
import { neutral77 } from "../../utils/style/colors";
import { fontSemibold13, fontSemibold14 } from "../../utils/style/fonts";
import { fontRegular13, fontRegular14 } from "../../utils/style/fonts";
import { BrandText } from "../BrandText";
import { SVG } from "../SVG";
import { SpacerColumn, SpacerRow } from "../spacer";
Expand All @@ -23,15 +23,7 @@ export const TextInputOutsideLabel: React.FC<TextInputLabelProps> = ({
<>
<View style={rowEndCStyle}>
<View style={rowCStyle}>
<BrandText
style={[
{
color: neutral77,
},
fontSemibold14,
labelStyle,
]}
>
<BrandText style={[{ color: neutral77 }, fontRegular14, labelStyle]}>
{label}
</BrandText>
{isAsterickSign && (
Expand All @@ -41,7 +33,7 @@ export const TextInputOutsideLabel: React.FC<TextInputLabelProps> = ({
</>
)}
</View>
{!!subtitle && <BrandText style={fontSemibold13}>{subtitle}</BrandText>}
{!!subtitle && <BrandText style={fontRegular13}>{subtitle}</BrandText>}
</View>
<SpacerColumn size={1} />
</>
Expand Down
8 changes: 3 additions & 5 deletions packages/components/multisig/MultisigTransactions.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
import { useMultisigTransactions } from "../../hooks/multisig/useMultisigTransactions";
import { useMultisigTransactionsCounts } from "../../hooks/multisig/useMultisigTransactionsCounts";
import { secondaryColor } from "../../utils/style/colors";
import { fontSemibold28 } from "../../utils/style/fonts";
import { fontRegular28 } from "../../utils/style/fonts";
import { headerHeight, layout } from "../../utils/style/layout";
import { BrandText } from "../BrandText";
import { EmptyList } from "../EmptyList";
Expand Down Expand Up @@ -111,7 +111,7 @@ export const MultisigTransactions: FC<{
<View>
{title && (
<>
<BrandText style={fontSemibold28}>{title}</BrandText>
<BrandText style={fontRegular28}>{title}</BrandText>
<SpacerColumn size={1.5} />
</>
)}
Expand All @@ -120,9 +120,7 @@ export const MultisigTransactions: FC<{
items={tabs}
onSelect={setSelectedTab}
selected={selectedTab}
tabContainerStyle={{
height: 64,
}}
tabContainerStyle={{ height: 64 }}
/>
</View>

Expand Down
42 changes: 12 additions & 30 deletions packages/screens/Multisig/MultisigCreateScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ import {
trashBackground,
} from "@/utils/style/colors";
import {
fontSemibold13,
fontSemibold14,
fontSemibold28,
fontRegular13,
fontRegular14,
fontRegular28,
} from "@/utils/style/fonts";
import { layout } from "@/utils/style/layout";

Expand Down Expand Up @@ -188,33 +188,22 @@ export const MultisigCreateScreen = () => {
? navigation.goBack()
: navigation.navigate("Multisig")
}
footerChildren={<></>}
noMargin
fullWidth
noScroll
isLarge
forceNetworkKind={NetworkKind.Cosmos}
>
<ScrollView
contentContainerStyle={{
padding: layout.contentSpacing,
paddingTop: layout.topContentSpacingWithHeading,
}}
>
<View
style={{
height: "100%",
maxWidth: 793,
}}
>
<BrandText style={fontSemibold28}>Create a Legacy Multisig</BrandText>
<View style={{ height: "100%", maxWidth: 793 }}>
<BrandText style={fontRegular28}>Create a Legacy Multisig</BrandText>
<SpacerColumn size={2.5} />
<MultisigSection
title="What is a Multisignature Wallet?"
containerStyle={{
maxWidth: 487,
}}
containerStyle={{ maxWidth: 487 }}
>
<BrandText style={[fontSemibold13, { color: neutralA3 }]}>
<BrandText style={[fontRegular13, { color: neutralA3 }]}>
This wallet adress is owned managed by at least 2 different
addresses and require signatures from co-owners to execute a
transaction.
Expand All @@ -227,9 +216,7 @@ export const MultisigCreateScreen = () => {
variant="labelOutside"
noBrokenCorners
label="Multisig name"
rules={{
required: true,
}}
rules={{ required: true }}
placeHolder="Type the name of the multisig"
iconSVG={walletInputSVG}
/>
Expand Down Expand Up @@ -308,12 +295,7 @@ export const MultisigCreateScreen = () => {
label="Number of Signatures required"
isAsterickSign
/>
<View
style={{
flexDirection: "row",
alignItems: "center",
}}
>
<View style={{ flexDirection: "row", alignItems: "center" }}>
<TextInputCustom<CreateMultisigWalletFormType>
defaultValue={defaultNbSignaturesRequired}
control={control}
Expand All @@ -331,7 +313,7 @@ export const MultisigCreateScreen = () => {
errorStyle={{ paddingLeft: layout.spacing_x1_5 }}
/>
<SpacerRow size={2} />
<BrandText style={[fontSemibold14, { color: neutral77 }]}>
<BrandText style={[fontRegular14, { color: neutral77 }]}>
signatures required on total of
</BrandText>
<SpacerRow size={2} />
Expand All @@ -348,7 +330,7 @@ export const MultisigCreateScreen = () => {
</View>
</View>

<BrandText style={[fontSemibold14, { color: neutral77 }]}>
<BrandText style={[fontRegular14, { color: neutral77 }]}>
This means that each transaction this multisig makes will require{" "}
{signatureRequiredValue || defaultNbSignaturesRequired} of the
members to sign it for it to be accepted by the validators.
Expand Down
25 changes: 9 additions & 16 deletions packages/screens/Multisig/MultisigScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import { useUserMultisigs } from "@/hooks/multisig/useUserMultisigs";
import { getUserId, NetworkKind } from "@/networks";
import { ScreenFC, useAppNavigation } from "@/utils/navigation";
import { neutral33, neutral77, secondaryColor } from "@/utils/style/colors";
import { fontSemibold16, fontSemibold28 } from "@/utils/style/fonts";
import { fontRegular16, fontRegular28 } from "@/utils/style/fonts";
import { layout } from "@/utils/style/layout";
import { tinyAddress } from "@/utils/text";

Expand All @@ -49,28 +49,25 @@ export const MultisigScreen: ScreenFC<"Multisig"> = () => {
return (
<ScreenContainer
headerChildren={<ScreenTitle>Multisig Wallets</ScreenTitle>}
footerChildren={<></>}
noMargin
fullWidth
isLarge
onBackPress={() => navigation.navigate("Multisig")}
noScroll
forceNetworkKind={NetworkKind.Cosmos}
>
<ScrollView>
<View style={containerCStyle}>
<View style={horizontalContentPaddingCStyle}>
<View>
<View
style={{
flexDirection: "row",
justifyContent: "space-between",
alignItems: "center",
}}
>
<BrandText style={fontSemibold28}>My Multisigs</BrandText>
<BrandText style={fontRegular28}>My Multisigs</BrandText>
<LoginButton userId={selectedWallet?.userId} />
</View>
<SpacerColumn size={1.5} />
<BrandText style={[fontSemibold16, { color: neutral77 }]}>
<BrandText style={[fontRegular16, { color: neutral77 }]}>
Overview of your Multisignatures Wallets
</BrandText>
<SpacerColumn size={2.5} />
Expand Down Expand Up @@ -119,10 +116,10 @@ export const MultisigScreen: ScreenFC<"Multisig"> = () => {
<SpacerColumn size={3} />
{!!invitations?.length && (
<>
<View style={horizontalContentPaddingCStyle}>
<BrandText style={fontSemibold28}>Invitations</BrandText>
<View>
<BrandText style={fontRegular28}>Invitations</BrandText>
<SpacerColumn size={1.5} />
<BrandText style={[fontSemibold16, { color: neutral77 }]}>
<BrandText style={[fontRegular16, { color: neutral77 }]}>
Multisignatures Wallets you did not join yet
</BrandText>
<SpacerColumn size={2.5} />
Expand Down Expand Up @@ -166,7 +163,7 @@ export const MultisigScreen: ScreenFC<"Multisig"> = () => {
</>
)}
{!!authToken && (
<View style={horizontalContentPaddingCStyle}>
<View>
<Separator color={neutral33} />
<SpacerColumn size={3} />
<MultisigTransactions
Expand All @@ -186,10 +183,6 @@ const containerCStyle: ViewStyle = {
paddingTop: layout.topContentSpacingWithHeading,
};

const horizontalContentPaddingCStyle: ViewStyle = {
paddingHorizontal: layout.contentSpacing,
};

const contentCenterCStyle: ViewStyle = {
flex: 1,
justifyContent: "center",
Expand Down
14 changes: 4 additions & 10 deletions packages/screens/Multisig/MultisigWalletDashboardScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import { getUserId, parseUserId } from "@/networks";
import { validateAddress } from "@/utils/formRules";
import { ScreenFC, useAppNavigation } from "@/utils/navigation";
import { neutral33 } from "@/utils/style/colors";
import { fontSemibold28 } from "@/utils/style/fonts";
import { fontRegular28 } from "@/utils/style/fonts";
import { layout } from "@/utils/style/layout";

type MultisigFormType = {
Expand All @@ -43,10 +43,8 @@ export const MultisigWalletDashboardScreen: ScreenFC<
return (
<ScreenContainer
headerChildren={<ScreenTitle>Dashboard {walletName}</ScreenTitle>}
isLarge
onBackPress={() => navigation.navigate("Multisig")}
footerChildren={<></>}
noMargin
fullWidth
forceNetworkId={network?.id}
>
<View
Expand All @@ -60,13 +58,9 @@ export const MultisigWalletDashboardScreen: ScreenFC<
key={multisigUserId}
>
<View
style={{
flex: 1,
padding: layout.contentSpacing,
paddingTop: layout.topContentSpacingWithHeading,
}}
style={{ flex: 1, paddingTop: layout.topContentSpacingWithHeading }}
>
<BrandText style={fontSemibold28}>General information</BrandText>
<BrandText style={fontRegular28}>General information</BrandText>
<SpacerColumn size={2.5} />
<MultisigSection title="Multisig Address">
<MultisigFormInput<MultisigFormType>
Expand Down
12 changes: 6 additions & 6 deletions packages/screens/Multisig/components/GetStartedOption.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ import {
secondaryColor,
} from "@/utils/style/colors";
import {
fontSemibold12,
fontSemibold14,
fontSemibold9,
fontRegular12,
fontRegular14,
fontRegular9,
} from "@/utils/style/fonts";
import { layout } from "@/utils/style/layout";

Expand Down Expand Up @@ -61,7 +61,7 @@ export const GetStartedOption: React.FC<GetStartedOptionProps> = ({
<View>
<BrandText
style={[
fontSemibold14,
fontRegular14,
{ color: styleDarker ? neutral55 : secondaryColor },
variant === "small" && smallTextCStyle,
titleStyle,
Expand All @@ -73,7 +73,7 @@ export const GetStartedOption: React.FC<GetStartedOptionProps> = ({
{subtitle && (
<BrandText
style={[
fontSemibold9,
fontRegular9,
{ color: neutral55 },
variant === "small" && smallTextCStyle,
]}
Expand Down Expand Up @@ -111,7 +111,7 @@ const smallContainerCStyle: ViewStyle = {
const smallTextCStyle: TextStyle = { textAlign: "center" };

const topTextCStyle: TextStyle = {
...fontSemibold12,
...fontRegular12,
position: "absolute",
top: 0,
right: 0,
Expand Down
4 changes: 2 additions & 2 deletions packages/screens/Multisig/components/MultisigFormInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
} from "@/components/inputs/TextInputCustom";
import { SpacerRow } from "@/components/spacer";
import { neutral55, neutral77, neutralA3 } from "@/utils/style/colors";
import { fontSemibold14 } from "@/utils/style/fonts";
import { fontRegular14 } from "@/utils/style/fonts";

interface MultisigFormInputProps<T extends FieldValues>
extends TextInputCustomProps<T> {
Expand Down Expand Up @@ -70,7 +70,7 @@ export const MultisigFormInput = <T extends FieldValues>({
<SpacerRow size={3} />
<BrandText
style={[
fontSemibold14,
fontRegular14,
{ color: neutral77, textTransform: "uppercase" },
]}
>
Expand Down
8 changes: 4 additions & 4 deletions packages/screens/Multisig/components/MultisigRightSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ import {
neutral77,
primaryColor,
} from "@/utils/style/colors";
import { fontSemibold12, fontSemibold13 } from "@/utils/style/fonts";
import { fontRegular12, fontRegular13 } from "@/utils/style/fonts";
import { layout } from "@/utils/style/layout";

export const MultisigRightSection: React.FC = () => {
Expand Down Expand Up @@ -251,7 +251,7 @@ export const MultisigRightSection: React.FC = () => {
return (
<View style={containerCStyle}>
<SpacerColumn size={5} />
<BrandText style={[fontSemibold12, { color: neutral55 }]}>
<BrandText style={[fontRegular12, { color: neutral55 }]}>
ACTIONS
</BrandText>
<SpacerColumn size={2} />
Expand Down Expand Up @@ -327,9 +327,9 @@ const BurnModal: React.FC<{
placeHolder="0"
defaultValue=""
subtitle={
<BrandText style={[fontSemibold13, { color: neutral77 }]}>
<BrandText style={[fontRegular13, { color: neutral77 }]}>
Available:{" "}
<BrandText style={[fontSemibold13, { color: primaryColor }]}>
<BrandText style={[fontRegular13, { color: primaryColor }]}>
{max}
</BrandText>
</BrandText>
Expand Down
Loading

0 comments on commit 6c21199

Please sign in to comment.