From d43891ac6bdd0742825bb137f22bcbf8d8b5a975 Mon Sep 17 00:00:00 2001 From: Carrotzpc Date: Tue, 9 Jul 2024 19:45:14 +0800 Subject: [PATCH] fix(Page): custom style not work --- src/Page/Content/style.ts | 2 +- src/Page/Header/style.ts | 3 +++ src/Page/Title/style.ts | 27 ++++++++++++--------------- 3 files changed, 16 insertions(+), 16 deletions(-) diff --git a/src/Page/Content/style.ts b/src/Page/Content/style.ts index a6217d7..f4f5320 100644 --- a/src/Page/Content/style.ts +++ b/src/Page/Content/style.ts @@ -4,7 +4,7 @@ export const useStyles = createStyles( ({ css, token }) => { return { root: css` - padding-top: ${token.paddingXS}px; + width: 100%; `, }; }, diff --git a/src/Page/Header/style.ts b/src/Page/Header/style.ts index a940bdc..970b5ae 100644 --- a/src/Page/Header/style.ts +++ b/src/Page/Header/style.ts @@ -8,13 +8,16 @@ export const useStyles = createStyles( return { root: bordered ? css` + margin-bottom: ${token.marginXS}px; padding: ${token.padding}px; + background-color: ${token.colorBgBase}; border-radius: ${token.borderRadius}px; box-shadow: ${token.boxShadowTertiary}; ` : css` padding-top: ${token.paddingXS}px; + margin-bottom: ${token.marginXS}px; ${divider && css` padding-bottom: ${token.paddingLG}px; diff --git a/src/Page/Title/style.ts b/src/Page/Title/style.ts index 06dd22b..4473d4b 100644 --- a/src/Page/Title/style.ts +++ b/src/Page/Title/style.ts @@ -1,18 +1,15 @@ import { createStyles } from 'antd-style'; -export const useStyles = createStyles( - ({ css, token }) => { - return { - root: css` - margin: 0; +export const useStyles = createStyles(({ css, token }) => { + return { + root: css` + margin: 0; - font-family: ${token.fontFamily}; - font-size: 16px; - font-weight: ${token.fontWeightStrong}; - line-height: ${token.lineHeight}; - color: ${token.colorText}; - `, - }; - }, - { hashPriority: 'low' } -); + font-family: ${token.fontFamily}; + font-size: 16px; + font-weight: ${token.fontWeightStrong}; + line-height: ${token.lineHeight}; + color: ${token.colorText}; + `, + }; +});