Skip to content

Commit 1fc24ef

Browse files
committedAug 20, 2021
fix: remove flex on dynamic content
1 parent 53f638f commit 1fc24ef

File tree

3 files changed

+22
-2
lines changed

3 files changed

+22
-2
lines changed
 

‎lib/components/layout.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ const Layout: React.FC<React.PropsWithChildren<LayoutProps>> = ({
7373
<Spacer />
7474
<Profile />
7575
{inDetailPage && <Title title={meta.title} date={meta.date} />}
76-
{children}
76+
<div className="dynamic-content">{children}</div>
7777
<Spacer h={5} />
7878
<Contacts isDetailPage={!!inDetailPage} />
7979
</div>
@@ -87,6 +87,11 @@ const Layout: React.FC<React.PropsWithChildren<LayoutProps>> = ({
8787
justify-content: center;
8888
}
8989
90+
.dynamic-content {
91+
width: 100%;
92+
height: auto;
93+
}
94+
9095
.container {
9196
width: 100%;
9297
max-width: ${Configs.layouts.pageWidth};

‎pages/posts/about.mdx

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
import { Layout } from 'lib/components'
2+
import { Button } from '@geist-ui/react'
3+
4+
export const meta = {
5+
title: 'Hello World',
6+
date: '2019-06-03T11:38:04.563Z',
7+
}
8+
9+
Welcome to `unix.bio`, run `npm run post` to create your first post.
10+
11+
<Button scale={2 / 3} auto onClick={() => alert('done')}>
12+
Click to share
13+
</Button>
14+
15+
export default ({ children }) => <Layout meta={meta}>{children}</Layout>

‎scripts/templates/posts/about.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ export const meta = {
88

99
Welcome to `unix.bio`, run `npm run post` to create your first post.
1010

11-
<Button scale={2 / 3} onClick={() => alert('done')}>
11+
<Button auto scale={2 / 3} onClick={() => alert('done')}>
1212
Click to share
1313
</Button>
1414

0 commit comments

Comments
 (0)
Please sign in to comment.