Skip to content

Commit

Permalink
Merge branch 'main' into docs/changelog-1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
YumoImer authored Nov 29, 2024
2 parents 77a0be6 + d6473c0 commit 3275ab6
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
12 changes: 7 additions & 5 deletions .dumi/theme/builtins/Previewer/CodePreviewer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -390,11 +390,13 @@ createRoot(document.getElementById('container')).render(<Demo />);
{!simplify && (
<section className="code-box-meta markdown">
<div className="code-box-title">
<Tooltip title={originDebug ? <FormattedMessage id="app.demo.debug" /> : ''}>
<a href={`#${asset.id}`} ref={anchorRef}>
{localizedTitle}
</a>
</Tooltip>
{localizedTitle && (
<Tooltip title={originDebug ? <FormattedMessage id="app.demo.debug" /> : ''}>
<a href={`#${asset.id}`} ref={anchorRef}>
{localizedTitle}
</a>
</Tooltip>
)}
<EditButton
title={<FormattedMessage id="app.content.edit-demo" />}
filename={filename}
Expand Down
2 changes: 2 additions & 0 deletions .dumi/theme/common/EditButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ const useStyle = createStyles(({ token, css }) => {
display: inline-block;
text-decoration: none;
vertical-align: middle;
pointer-events: auto;
z-index: 999;
margin-inline-start: ${token.marginXS}px;
${iconCls} {
display: block;
Expand Down
9 changes: 5 additions & 4 deletions .dumi/theme/common/styles/Demo.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react';
import { css, Global } from '@emotion/react';
import { Global, css } from '@emotion/react';
import { useTheme } from 'antd-style';
import React from 'react';

const GlobalDemoStyles: React.FC = () => {
const token = useTheme();
Expand Down Expand Up @@ -74,6 +74,7 @@ const GlobalDemoStyles: React.FC = () => {
&-title {
position: absolute;
top: -14px;
height: auto;
padding: 1px 8px;
color: #777;
background: ${token.colorBgContainer};
Expand Down Expand Up @@ -291,8 +292,8 @@ const GlobalDemoStyles: React.FC = () => {
}
&-codesandbox {
width: 16px;
height: 16px;
width: 14px;
height: 14px;
overflow: hidden;
border: 0;
cursor: pointer;
Expand Down

0 comments on commit 3275ab6

Please sign in to comment.