Skip to content

Commit

Permalink
style: modify component style.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Mar 15, 2024
1 parent 8d4688f commit 1ea9a9c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
16 changes: 8 additions & 8 deletions core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const Demo = () => {
<div>这里是示例展示</div>
</Preview>
<Toolbar>Code Example</Toolbar>
<Code>
<Code tagName="pre">
{code}
</Code>
</CodeLayout>
Expand Down Expand Up @@ -57,7 +57,7 @@ const Demo = () => {
<div>这里是示例展示</div>
</Preview>
<Toolbar>Code Example</Toolbar>
<Code>
<Code tagName="pre">
{code}
</Code>
</CodeLayout>
Expand All @@ -84,7 +84,7 @@ const Demo = () => (
<div>示例内容</div>
</Preview>
<Toolbar>Code Example</Toolbar>
<Code>
<Code tagName="pre">
{code}
</Code>
</CodeLayout>
Expand All @@ -110,7 +110,7 @@ const Demo = () => (
<div>示例内容</div>
</Preview>
<Toolbar>Code Example</Toolbar>
<Code>
<Code tagName="pre">
{code}
</Code>
</CodeLayout>
Expand All @@ -137,7 +137,7 @@ const Demo = () => {
<div>示例内容</div>
</Preview>
<Toolbar extra={<div>按钮</div>}>Code Example</Toolbar>
<Code>
<Code tagName="pre">
{code}
</Code>
</CodeLayout>
Expand Down Expand Up @@ -170,7 +170,7 @@ const Demo = ()=> {
<div>示例内容</div>
</Preview>
<Toolbar visible={visible} collapse={!visible}>Code Example</Toolbar>
<Code>
<Code tagName="pre">
{code}
</Code>
</CodeLayout>
Expand Down Expand Up @@ -248,7 +248,7 @@ const Demo = () => (
<Toolbar text={code} visibleButton={false} extra={extra}>
Code Example
</Toolbar>
<Code>{code}</Code>
<Code tagName="pre">{code}</Code>
</CodeLayout>
);
export default Demo;
Expand All @@ -266,7 +266,7 @@ import CodeLayout from "react-code-preview-layout"
<CodeLayout.Toolbar text={code} visibleButton={false} extra={extra}>
Code Example
</CodeLayout.Toolbar>
<CodeLayout.Code>{code}</CodeLayout.Code>
<CodeLayout.Code tagName="pre">{code}</CodeLayout.Code>
</CodeLayout>
```

Expand Down
2 changes: 2 additions & 0 deletions core/src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
}
.w-rcpl.w-bordered > .w-rcpl-code:not(.w-hidden) {
border-top: 1px dashed var(--color-border-muted);
border-radius: 0 0 6px 6px;
}

.w-rcpl {
Expand All @@ -35,6 +36,7 @@
overflow: auto;
border-top-left-radius: 0px;
border-top-right-radius: 0px;
margin-bottom: 0 !important;
}
.w-rcpl-code > * {
padding: 0 !important;
Expand Down

0 comments on commit 1ea9a9c

Please sign in to comment.