Files
react/lib/components/customization/layout.tsx
witt 80956b0cc8 chore: release v2.1.0-canary.3 (#450)
* docs: add link to GH discussions

* chore: upgrade deps

* chore: update code style for prettier

* chore: release v2.1.0-canary.3

* chore(deps): upgrade babel

* chore: replace enzyme adapter with community repo to fit react.17

* test: updatee snapshots for auto typesetting

* test(config): ignore unexported parts of the tools
2021-02-14 15:27:37 +08:00

42 lines
906 B
TypeScript

import React from 'react'
import { useTheme, Row } from 'components'
import CustomizationCodes from './codes'
import Demo from './demo'
const CustomizationLayout: React.FC<React.PropsWithChildren<unknown>> = ({
children,
}) => {
const theme = useTheme()
return (
<div className="layout">
<Row>
<Demo />
<div className="content">{children}</div>
</Row>
<Row>
<CustomizationCodes />
</Row>
<style jsx>{`
.layout {
min-height: calc(100vh - 108px);
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;
}
`}</style>
</div>
)
}
export default CustomizationLayout