Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Improve typography

dominik-zeglen3a759dc9ff37
diff --git a/saleor/static/dashboard-next/customers/components/CustomerStats/CustomerStats.tsx b/saleor/static/dashboard-next/customers/components/CustomerStats/CustomerStats.tsx
index c8b400595a..69e04a2477 100644
--- a/saleor/static/dashboard-next/customers/components/CustomerStats/CustomerStats.tsx
+++ b/saleor/static/dashboard-next/customers/components/CustomerStats/CustomerStats.tsx
@@ -20,8 +20,7 @@ import { CustomerDetails_user } from "../../types/CustomerDetails";
const styles = (theme: Theme) =>
createStyles({
label: {
- marginBottom: theme.spacing.unit,
- textTransform: "uppercase"
+ marginBottom: theme.spacing.unit
},
value: {
fontSize: 24
@@ -37,7 +36,7 @@ const CustomerStats = withStyles(styles, { name: "CustomerStats" })(
<Card>
<CardTitle title={i18n.t("Customer History")} />
<CardContent>
- <Typography className={classes.label} variant="body2">
+ <Typography className={classes.label} variant="caption">
{i18n.t("Last login")}
</Typography>
{maybe(
@@ -55,7 +54,7 @@ const CustomerStats = withStyles(styles, { name: "CustomerStats" })(
</CardContent>
<Hr />
<CardContent>
- <Typography className={classes.label} variant="body2">
+ <Typography className={classes.label} variant="caption">
{i18n.t("Last order")}
</Typography>
{maybe(
diff --git a/saleor/static/dashboard-next/discounts/components/SaleSummary/SaleSummary.tsx b/saleor/static/dashboard-next/discounts/components/SaleSummary/SaleSummary.tsx
index c023d17d4b..c36433c08d 100644
--- a/saleor/static/dashboard-next/discounts/components/SaleSummary/SaleSummary.tsx
+++ b/saleor/static/dashboard-next/discounts/components/SaleSummary/SaleSummary.tsx
@@ -3,6 +3,7 @@ import CardContent from "@material-ui/core/CardContent";
import Typography from "@material-ui/core/Typography";
import * as React from "react";
+import CardSpacer from "../../../components/CardSpacer";
import CardTitle from "../../../components/CardTitle";
import Date from "../../../components/Date";
import FormSpacer from "../../../components/FormSpacer";
@@ -27,13 +28,13 @@ const SaleSummary: React.StatelessComponent<SaleSummaryProps> = ({
<Card>
<CardTitle title={i18n.t("Summary")} />
<CardContent>
- <Typography variant="body2">{i18n.t("Name")}</Typography>
+ <Typography variant="caption">{i18n.t("Name")}</Typography>
<Typography>
{maybe<React.ReactNode>(() => sale.name, <Skeleton />)}
</Typography>
<FormSpacer />
- <Typography variant="body2">{i18n.t("Value")}</Typography>
+ <Typography variant="caption">{i18n.t("Value")}</Typography>
<Typography>
{maybe<React.ReactNode>(
() =>
@@ -50,12 +51,12 @@ const SaleSummary: React.StatelessComponent<SaleSummaryProps> = ({
<Skeleton />
)}
</Typography>
- </CardContent>
- <Hr />
+ <CardSpacer />
+ <Hr />
+ <CardSpacer />
- <CardContent>
- <Typography variant="body2">{i18n.t("Start Date")}</Typography>
+ <Typography variant="caption">{i18n.t("Start Date")}</Typography>
<Typography>
{maybe<React.ReactNode>(
() => (
@@ -66,7 +67,7 @@ const SaleSummary: React.StatelessComponent<SaleSummaryProps> = ({
</Typography>
<FormSpacer />
- <Typography variant="body2">{i18n.t("End Date")}</Typography>
+ <Typography variant="caption">{i18n.t("End Date")}</Typography>
<Typography>
{maybe<React.ReactNode>(
() =>
diff --git a/saleor/static/dashboard-next/discounts/components/VoucherSummary/VoucherSummary.tsx b/saleor/static/dashboard-next/discounts/components/VoucherSummary/VoucherSummary.tsx
index ecff947fa5..a966e682aa 100644
--- a/saleor/static/dashboard-next/discounts/components/VoucherSummary/VoucherSummary.tsx
+++ b/saleor/static/dashboard-next/discounts/components/VoucherSummary/VoucherSummary.tsx
@@ -15,6 +15,7 @@ import { maybe } from "../../../misc";
import { VoucherDiscountValueType } from "../../../types/globalTypes";
import { translateVoucherTypes } from "../../translations";
import { VoucherDetails_voucher } from "../../types/VoucherDetails";
+import CardSpacer from "../../../components/CardSpacer";
export interface VoucherSummaryProps {
defaultCurrency: string;
@@ -31,13 +32,13 @@ const VoucherSummary: React.StatelessComponent<VoucherSummaryProps> = ({
<Card>
<CardTitle title={i18n.t("Summary")} />
<CardContent>
- <Typography variant="body2">{i18n.t("Name")}</Typography>
+ <Typography variant="caption">{i18n.t("Name")}</Typography>
<Typography>
{maybe<React.ReactNode>(() => voucher.name, <Skeleton />)}
</Typography>
<FormSpacer />
- <Typography variant="body2">{i18n.t("Applies to")}</Typography>
+ <Typography variant="caption">{i18n.t("Applies to")}</Typography>
<Typography>
{maybe<React.ReactNode>(
() => translatedVoucherTypes[voucher.type],
@@ -46,7 +47,7 @@ const VoucherSummary: React.StatelessComponent<VoucherSummaryProps> = ({
</Typography>
<FormSpacer />
- <Typography variant="body2">{i18n.t("Value")}</Typography>
+ <Typography variant="caption">{i18n.t("Value")}</Typography>
<Typography>
{maybe<React.ReactNode>(
() =>
@@ -63,12 +64,12 @@ const VoucherSummary: React.StatelessComponent<VoucherSummaryProps> = ({
<Skeleton />
)}
</Typography>
- </CardContent>
- <Hr />
+ <CardSpacer />
+ <Hr />
+ <CardSpacer />
- <CardContent>
- <Typography variant="body2">{i18n.t("Start Date")}</Typography>
+ <Typography variant="caption">{i18n.t("Start Date")}</Typography>
<Typography>
{maybe<React.ReactNode>(
() => (
@@ -79,7 +80,7 @@ const VoucherSummary: React.StatelessComponent<VoucherSummaryProps> = ({
</Typography>
<FormSpacer />
- <Typography variant="body2">{i18n.t("End Date")}</Typography>
+ <Typography variant="caption">{i18n.t("End Date")}</Typography>
<Typography>
{maybe<React.ReactNode>(
() =>
@@ -91,12 +92,12 @@ const VoucherSummary: React.StatelessComponent<VoucherSummaryProps> = ({
<Skeleton />
)}
</Typography>
- </CardContent>
- <Hr />
+ <CardSpacer />
+ <Hr />
+ <CardSpacer />
- <CardContent>
- <Typography variant="body2">{i18n.t("Min. Order Value")}</Typography>
+ <Typography variant="caption">{i18n.t("Min. Order Value")}</Typography>
<Typography>
{maybe<React.ReactNode>(
() =>
@@ -110,7 +111,7 @@ const VoucherSummary: React.StatelessComponent<VoucherSummaryProps> = ({
</Typography>
<FormSpacer />
- <Typography variant="body2">{i18n.t("Usage Limit")}</Typography>
+ <Typography variant="caption">{i18n.t("Usage Limit")}</Typography>
<Typography>
{maybe<React.ReactNode>(
() => (voucher.usageLimit === null ? "-" : voucher.usageLimit),