From d989a4e53bb72ef1fff0f524c699ab23ad867212 Mon Sep 17 00:00:00 2001 From: Wuxh Date: Fri, 25 Nov 2022 00:04:27 +0800 Subject: [PATCH] chore: improve site (#38885) * chore: update * chore: improve-site * chore(site): fix the address bar of switching writing mode Error problem * chore: format accept suggestion Co-authored-by: MadCcc <1075746765@qq.com> * Revert "chore: update" This reverts commit cb7e74d35061f864011330be12a642c8baf329d4. Co-authored-by: MadCcc <1075746765@qq.com> --- .dumi/theme/builtins/Previewer/index.jsx | 10 +++++----- .dumi/theme/common/GlobalStyles.tsx | 12 +++--------- .dumi/theme/slots/Header/index.tsx | 4 ++-- 3 files changed, 10 insertions(+), 16 deletions(-) diff --git a/.dumi/theme/builtins/Previewer/index.jsx b/.dumi/theme/builtins/Previewer/index.jsx index 2a1af13f8c..33aea51788 100644 --- a/.dumi/theme/builtins/Previewer/index.jsx +++ b/.dumi/theme/builtins/Previewer/index.jsx @@ -1,7 +1,7 @@ /* eslint jsx-a11y/no-noninteractive-element-interactions: 0 */ import { CheckOutlined, SnippetsOutlined, ThunderboltOutlined } from '@ant-design/icons'; import stackblitzSdk from '@stackblitz/sdk'; -import { Alert, Badge, Tooltip } from 'antd'; +import { Alert, Badge, Tooltip, Space } from 'antd'; import classNames from 'classnames'; import LZString from 'lz-string'; import React from 'react'; @@ -375,7 +375,7 @@ createRoot(document.getElementById('container')).render(); />
{introChildren}
-
+ {showRiddleButton ? (
); } > - +
expand code); className={codeExpand ? 'code-expand-icon-show' : 'code-expand-icon-hide'} onClick={() => this.handleCodeExpand(meta.id)} /> - +
-
+
{ } .code-expand-icon { + width: 16px; + height: 16px; + position: relative; cursor: pointer; } @@ -1086,7 +1089,6 @@ const GlobalStyles = () => { align-items: center; width: 16px; height: 16px; - margin-left: 16px; color: ${token.colorTextSecondary}; cursor: pointer; transition: all 0.24s; @@ -1096,14 +1098,6 @@ const GlobalStyles = () => { margin-left: 0; } - &:first-child { - margin-left: 0; - - ${antCls}-row-rtl & { - margin-right: 0; - } - } - &:hover { color: ${token.colorText}; } diff --git a/.dumi/theme/slots/Header/index.tsx b/.dumi/theme/slots/Header/index.tsx index cce7bf6397..cc3344dec2 100644 --- a/.dumi/theme/slots/Header/index.tsx +++ b/.dumi/theme/slots/Header/index.tsx @@ -232,9 +232,9 @@ const Header: React.FC = (props) => { const onMenuVisibleChange = useCallback((visible: boolean) => { setHeaderState((prev) => ({ ...prev, menuVisible: visible })); }, []); - const onDirectionChange = useCallback(() => { + const onDirectionChange = () => { changeDirection?.(direction !== 'rtl' ? 'rtl' : 'ltr'); - }, [direction]); + }; useEffect(() => { handleHideMenu();