From 63e4d2976040770c2caae2ef078791b05cf09e28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=81=87=E8=A7=81=E5=90=8C=E5=AD=A6?= <1875694521@qq.com> Date: Tue, 27 Jan 2026 18:30:58 +0800 Subject: [PATCH] docs: fix token table title style issue (#56766) --- .dumi/theme/builtins/ComponentTokenTable/index.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.dumi/theme/builtins/ComponentTokenTable/index.tsx b/.dumi/theme/builtins/ComponentTokenTable/index.tsx index 1fa21b950b..755682ebd9 100644 --- a/.dumi/theme/builtins/ComponentTokenTable/index.tsx +++ b/.dumi/theme/builtins/ComponentTokenTable/index.tsx @@ -1,7 +1,7 @@ import React, { useMemo, useState } from 'react'; import { LinkOutlined, QuestionCircleOutlined, RightOutlined } from '@ant-design/icons'; import { ConfigProvider, Flex, Popover, Table, Typography } from 'antd'; -import { createStaticStyles, css, useTheme } from 'antd-style'; +import { createStyles, css, useTheme } from 'antd-style'; import { getDesignToken } from 'antd-token-previewer'; import tokenMeta from 'antd/es/version/token-meta.json'; import tokenData from 'antd/es/version/token.json'; @@ -53,7 +53,7 @@ const locales = { }, }; -const styles = createStaticStyles(({ cssVar }) => ({ +const useStyle = createStyles(({ cssVar }) => ({ tableTitle: css` cursor: pointer; position: relative; @@ -104,6 +104,8 @@ const SubTokenTable: React.FC = (props) => { const [open, setOpen] = useState(defaultOpen ?? process.env.NODE_ENV !== 'production'); + const { styles } = useStyle(); + if (!tokens.length) { return null; }