Skip to content

Commit

Permalink
chore: improve site (#38885)
Browse files Browse the repository at this point in the history
* 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 cb7e74d.

Co-authored-by: MadCcc <1075746765@qq.com>
  • Loading branch information
Wxh16144 and MadCcc committed Nov 24, 2022
1 parent 2a3cd3d commit d989a4e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 16 deletions.
10 changes: 5 additions & 5 deletions .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';
Expand Down Expand Up @@ -375,7 +375,7 @@ createRoot(document.getElementById('container')).render(<Demo />);
/>
</div>
<div className="code-box-description">{introChildren}</div>
<div className="code-box-actions">
<Space wrap size="middle" className="code-box-actions">
{showRiddleButton ? (
<form
className="code-box-code-action"
Expand Down Expand Up @@ -466,7 +466,7 @@ createRoot(document.getElementById('container')).render(<Demo />);
<Tooltip
title={<FormattedMessage id={`app.demo.code.${codeExpand ? 'hide' : 'show'}`} />}
>
<span className="code-expand-icon code-box-code-action">
<div className="code-expand-icon code-box-code-action">
<img
alt="expand code"
src={
Expand All @@ -487,9 +487,9 @@ createRoot(document.getElementById('container')).render(<Demo />);
className={codeExpand ? 'code-expand-icon-show' : 'code-expand-icon-hide'}
onClick={() => this.handleCodeExpand(meta.id)}
/>
</span>
</div>
</Tooltip>
</div>
</Space>
</section>
<section className={highlightClass} key="code">
<CodePreview
Expand Down
12 changes: 3 additions & 9 deletions .dumi/theme/common/GlobalStyles.tsx
Expand Up @@ -1004,6 +1004,9 @@ const GlobalStyles = () => {
}
.code-expand-icon {
width: 16px;
height: 16px;
position: relative;
cursor: pointer;
}
Expand Down Expand Up @@ -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;
Expand All @@ -1096,14 +1098,6 @@ const GlobalStyles = () => {
margin-left: 0;
}
&:first-child {
margin-left: 0;
${antCls}-row-rtl & {
margin-right: 0;
}
}
&:hover {
color: ${token.colorText};
}
Expand Down
4 changes: 2 additions & 2 deletions .dumi/theme/slots/Header/index.tsx
Expand Up @@ -232,9 +232,9 @@ const Header: React.FC<HeaderProps> = (props) => {
const onMenuVisibleChange = useCallback((visible: boolean) => {
setHeaderState((prev) => ({ ...prev, menuVisible: visible }));
}, []);
const onDirectionChange = useCallback(() => {
const onDirectionChange = () => {
changeDirection?.(direction !== 'rtl' ? 'rtl' : 'ltr');
}, [direction]);
};

useEffect(() => {
handleHideMenu();
Expand Down

0 comments on commit d989a4e

Please sign in to comment.