docs: show and copy the theme codes of user changes

This commit is contained in:
unix
2020-04-11 09:26:36 +08:00
parent 7452fe1279
commit 156b39ded8
14 changed files with 178 additions and 65 deletions

View File

@@ -1,5 +1,6 @@
import React from 'react'
import { useTheme } from 'components'
import { useTheme, Row } from 'components'
import CustomizationCodes from './codes'
import Demo from './demo'
const CustomizationLayout: React.FC<React.PropsWithChildren<{}>> = ({
@@ -9,22 +10,30 @@ const CustomizationLayout: React.FC<React.PropsWithChildren<{}>> = ({
return (
<div className="layout">
<Demo />
<div className="content">
{children}
</div>
<Row>
<Demo />
<div className="content">
{children}
</div>
</Row>
<Row>
<CustomizationCodes />
</Row>
<style jsx>{`
.layout {
min-height: calc(100vh - 108px);
max-width: 1000px;
max-width: ${theme.layout.pageWidthWithMargin};
margin: 0 auto;
padding: 0 ${theme.layout.gap};
display: flex;
flex-direction: column;
box-sizing: border-box;
}
.content {
flex: 1;
overflow: hidden;
}
.demo {