Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IOAPPX-435] Improve typography by standardising sizes and removing redundant styles #360

Merged
merged 12 commits into from
Nov 20, 2024
6 changes: 3 additions & 3 deletions example/src/components/AssetViewerBox.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { IOColors, LabelSmall, hexToRgba } from "@pagopa/io-app-design-system";
import { IOColors, BodySmall, hexToRgba } from "@pagopa/io-app-design-system";
import React from "react";
import {
ImageBackground,
Expand Down Expand Up @@ -157,13 +157,13 @@ export const AssetViewerBox = ({
}}
>
{name && (
<LabelSmall
<BodySmall
color={"bluegrey"}
style={{ alignSelf: "flex-start" }}
weight={"Regular"}
>
{name}
</LabelSmall>
</BodySmall>
)}
</View>
</View>
Expand Down
2 changes: 1 addition & 1 deletion example/src/pages/Advice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const renderFeatureInfo = () => {
},
{
text: "Questa la seconda parte in grassetto. ",
weight: "Bold"
weight: "Semibold"
},
{
text: "Questa la terza parte che torna "
Expand Down
6 changes: 3 additions & 3 deletions example/src/pages/Colors.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import {
BodySmall,
H2,
H3,
IOColorGradients,
Expand All @@ -12,7 +13,6 @@ import {
IOThemeLight,
IOVisualCostants,
LabelMini,
LabelSmall,
VSpacer,
hexToRgba,
themeStatusColorsDarkMode,
Expand Down Expand Up @@ -336,9 +336,9 @@ const GradientBox = ({ name, colors }: GradientBoxProps) => {
{last && <Text style={styles.colorPill}>{last}</Text>}
</LinearGradient>
{name && (
<LabelSmall weight="Regular" color="grey-700">
<BodySmall weight="Regular" color="grey-700">
{name}
</LabelSmall>
</BodySmall>
)}
</View>
);
Expand Down
18 changes: 9 additions & 9 deletions example/src/pages/Layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
IOSpacer,
IOVisualCostants,
LabelMini,
LabelSmall,
BodySmall,
VSpacer,
VStack,
useIOTheme
Expand Down Expand Up @@ -201,10 +201,10 @@ const VStackBlocks = () => {
backgroundColor: IOColors[theme["appBackground-tertiary"]]
}}
>
<LabelSmall
<BodySmall
weight="Regular"
color={theme["textBody-tertiary"]}
>{`Block n.${i + 1}`}</LabelSmall>
>{`Block n.${i + 1}`}</BodySmall>
</View>
))}
<View
Expand All @@ -216,9 +216,9 @@ const VStackBlocks = () => {
backgroundColor: IOColors[theme["appBackground-tertiary"]]
}}
>
<LabelSmall weight="Regular" color={theme["textBody-tertiary"]}>
<BodySmall weight="Regular" color={theme["textBody-tertiary"]}>
Different height
</LabelSmall>
</BodySmall>
</View>
</>
);
Expand All @@ -240,9 +240,9 @@ const HStackBlocks = () => {
backgroundColor: IOColors[theme["appBackground-tertiary"]]
}}
>
<LabelSmall weight="Regular" color={theme["textBody-tertiary"]}>{`${
<BodySmall weight="Regular" color={theme["textBody-tertiary"]}>{`${
i + 1
}`}</LabelSmall>
}`}</BodySmall>
</View>
))}
<View
Expand All @@ -254,9 +254,9 @@ const HStackBlocks = () => {
backgroundColor: IOColors[theme["appBackground-tertiary"]]
}}
>
<LabelSmall weight="Regular" color={theme["textBody-tertiary"]}>
<BodySmall weight="Regular" color={theme["textBody-tertiary"]}>
Growing block
</LabelSmall>
</BodySmall>
</View>
</>
);
Expand Down
6 changes: 3 additions & 3 deletions example/src/pages/MainScreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
Divider,
H1,
IOStyles,
LabelSmall,
BodySmall,
ListItemNav,
ListItemSwitch,
VSpacer,
Expand Down Expand Up @@ -78,9 +78,9 @@ const MainScreen = (props: Props) => {
<View style={{ marginTop: 24, marginBottom: 8 }}>
<H1>{title}</H1>
{description && (
<LabelSmall weight={"Regular"} color={theme["textBody-tertiary"]}>
<BodySmall weight={"Regular"} color={theme["textBody-tertiary"]}>
{description}
</LabelSmall>
</BodySmall>
)}
</View>
);
Expand Down
6 changes: 3 additions & 3 deletions example/src/pages/NumberPad.tsx
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import {
BodySmall,
CodeInput,
ContentWrapper,
H1,
H5,
IOColors,
IOStyles,
IOVisualCostants,
LabelSmall,
ListItemSwitch,
NumberPad,
VSpacer,
Expand Down Expand Up @@ -69,12 +69,12 @@ export const NumberPadScreen = () => {
<H5>{"Value Typed on the NumberPad component"}</H5>
<VSpacer />

<LabelSmall
<BodySmall
weight="Semibold"
color={blueBackground ? "white" : "black"}
>
{value}
</LabelSmall>
</BodySmall>
</View>
<VSpacer />
<CodeInput
Expand Down
4 changes: 2 additions & 2 deletions example/src/pages/OTPInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
IOStyles,
VSpacer,
OTPInput,
LabelSmall,
BodySmall,
ButtonSolid,
ContentWrapper,
ButtonOutline
Expand Down Expand Up @@ -117,7 +117,7 @@ export const OTPInputScreen = () => {
<OTPWrapper secret />
<VSpacer />
<H5>Validation+Secret</H5>
<LabelSmall>Correct OTP {`${OTP_COMPARE}`}</LabelSmall>
<BodySmall>Correct OTP {`${OTP_COMPARE}`}</BodySmall>
<VSpacer />
<OTPWrapper secret validation />
<VSpacer />
Expand Down
6 changes: 3 additions & 3 deletions example/src/pages/Selection.tsx
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import {
AnimatedMessageCheckbox,
BodySmall,
CheckboxLabel,
Divider,
H2,
HSpacer,
IOColors,
IOStyles,
IOVisualCostants,
LabelSmall,
ListItemCheckbox,
ListItemSwitch,
NativeSwitch,
Expand Down Expand Up @@ -179,13 +179,13 @@ const mockRadioItems = (): ReadonlyArray<RadioItem<string>> => [
{
value: "Let's try with JSX description",
description: (
<LabelSmall color="grey-700" weight="Regular">
<BodySmall color="grey-700" weight="Regular">
Ti contatteranno solo i servizi che hanno qualcosa di importante da
dirti.{" "}
<Text style={{ color: IOColors["grey-700"], fontWeight: "600" }}>
Potrai sempre disattivare le comunicazioni che non ti interessano.
</Text>
</LabelSmall>
</BodySmall>
),
id: "example-jsx-element"
},
Expand Down
Loading
Loading