site(theme): demo block supports no inner margin configuration

ref: https://d.umijs.org/guide/write-demo#%E4%B8%8D%E9%9C%80%E8%A6%81%E5%86%85%E8%BE%B9%E8%B7%9D
This commit is contained in:
wuxh 2022-12-22 13:14:32 +08:00
parent 665a738328
commit ee2ff25796
No known key found for this signature in database
GPG Key ID: 464F03149513C20C
2 changed files with 5 additions and 1 deletions

View File

@ -355,7 +355,7 @@ createRoot(document.getElementById('container')).render(<Demo />);
let codeBox = (
<section className={codeBoxClass} id={meta.id}>
<section className="code-box-demo">
<section className="code-box-demo" data-compact={meta.compact}>
<ErrorBoundary>
<React.StrictMode>{this.liveDemo}</React.StrictMode>
</ErrorBoundary>

View File

@ -40,6 +40,10 @@ export default () => {
&,
.code-box-demo {
background-color: ${token.colorBgContainer};
&[data-compact] {
padding: 0;
}
}
.markdown {