Skip to content

Commit

Permalink
fix(Previewer): reset container style
Browse files Browse the repository at this point in the history
  • Loading branch information
Carrotzpc committed Jul 31, 2024
1 parent eb09ab7 commit 3f0993f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 6 additions & 2 deletions src/builtins/Previewer/style-reset.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,12 @@
import { css } from 'antd-style';
import { FullToken, css } from 'antd-style';

// reset style of https://github.com/lobehub/lobe-ui/blob/master/src/Markdown/markdown.style.ts
export const resetStyle = css`
export const resetStyle = (token: FullToken) => css`
/* stylelint-disable */
font-size: ${token.fontSize}px;
line-height: ${token.lineHeight};
word-break: normal;
a {
color: revert;
Expand Down
2 changes: 1 addition & 1 deletion src/builtins/Previewer/style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ export const useStyles = createStyles(({ css, token, prefixCls }) => {
}
`,
container: css`
${resetStyle}
${resetStyle(token)}
.dumi-default-previewer {
overflow: hidden;
display: flex;
Expand Down

0 comments on commit 3f0993f

Please sign in to comment.