From f2445a89ee8877637653525722ab9344c2dd34a3 Mon Sep 17 00:00:00 2001 From: afc163 Date: Thu, 10 Oct 2024 13:38:45 +0800 Subject: [PATCH] docs: tweak demo toggle button style (#51184) --- .dumi/theme/builtins/DemoWrapper/index.tsx | 51 ++++++++++------------ .dumi/theme/common/styles/Demo.tsx | 25 +++++------ 2 files changed, 35 insertions(+), 41 deletions(-) diff --git a/.dumi/theme/builtins/DemoWrapper/index.tsx b/.dumi/theme/builtins/DemoWrapper/index.tsx index 8b125ab3fa..85726b881b 100644 --- a/.dumi/theme/builtins/DemoWrapper/index.tsx +++ b/.dumi/theme/builtins/DemoWrapper/index.tsx @@ -1,13 +1,6 @@ import React, { useContext } from 'react'; -import { - BugFilled, - BugOutlined, - CodeFilled, - CodeOutlined, - ExperimentFilled, - ExperimentOutlined, -} from '@ant-design/icons'; -import { ConfigProvider, Tooltip } from 'antd'; +import { BugOutlined, CodeOutlined, ExperimentOutlined } from '@ant-design/icons'; +import { ConfigProvider, Tooltip, Button } from 'antd'; import classNames from 'classnames'; import { DumiDemoGrid, FormattedMessage } from 'dumi'; @@ -33,10 +26,6 @@ const DemoWrapper: typeof DumiDemoGrid = ({ items }) => { const [expandAll, setExpandAll] = useLayoutState(false); const [enableCssVar, setEnableCssVar] = useLayoutState(true); - const expandTriggerClass = classNames('code-box-expand-trigger', { - 'code-box-expand-trigger-active': expandAll, - }); - const handleVisibleToggle = () => { setShowDebug?.(!showDebug); }; @@ -84,29 +73,35 @@ const DemoWrapper: typeof DumiDemoGrid = ({ items }) => { } > - {expandAll ? ( - - ) : ( - - )} +