Skip to content

Commit 0b1494f

Browse files
committed
Fix button mdx page responsive design
1 parent 200013a commit 0b1494f

File tree

4 files changed

+18
-10
lines changed

4 files changed

+18
-10
lines changed

apps/landing/src/app/(detail)/components/MdxCard.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ export default function MdxCard({ children }: { children: React.ReactNode }) {
1616
border: '1px solid $border',
1717
bg: '$containerBackground',
1818
maxWidth: '100%',
19+
minWidth: '300px',
20+
flexShrink: 0,
1921
cursor: 'default',
2022
marginBottom: '20px',
2123
_lastChild: {

apps/landing/src/app/(detail)/components/Table.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export function Table({
1919
selectors={{
2020
'& th, & td': {
2121
border: 'none',
22+
minWidth: '200px',
2223
},
2324
}}
2425
{...props}

apps/landing/src/app/(detail)/components/button/Examples.mdx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,17 +5,17 @@ import MdxCardFooter from '../MdxCardFooter'
55

66
###### Examples
77

8-
<div style={{ display: 'flex', gap: '16px' }}>
8+
<div style={{ display: 'flex', gap: '16px', flexWrap: 'wrap' }}>
99
<section style={{ flex: '1 1 0%' }}>
1010
<MdxCard>
1111
<div style={{ padding: '32px 24px' }}>
1212
<div style={{width: '100%'}}>
13-
<div style={{ display: 'flex', gap: '12px', marginBottom: '16px' }}>
13+
<div style={{ display: 'flex',flexWrap: 'wrap', gap: '12px', marginBottom: '16px' }}>
1414
<Button size="sm" style={{ height: 'min-content' }} variant="primary">Primary sm</Button>
1515
<Button size="md" style={{ height: 'min-content' }} variant="primary">Primary md</Button>
1616
<Button size="lg" style={{ height: 'min-content' }} variant="primary">Primary lg</Button>
1717
</div>
18-
<div style={{ display: 'flex', gap: '12px' }}>
18+
<div style={{ display: 'flex',flexWrap: 'wrap', gap: '12px' }}>
1919
<Button size="sm" style={{ height: 'min-content' }}>Default sm</Button>
2020
<Button size="md" style={{ height: 'min-content' }}>Default md</Button>
2121
<Button size="lg" style={{ height: 'min-content' }}>Default lg</Button>
@@ -56,7 +56,7 @@ import MdxCardFooter from '../MdxCardFooter'
5656
<div style={{ padding: '32px 24px' }}>
5757
<div style={{ width: '100%' }}>
5858
<div
59-
style={{ display: 'flex', gap: '12px', marginBottom: '16px' }}
59+
style={{ display: 'flex',flexWrap:'wrap', gap: '12px', marginBottom: '16px' }}
6060
>
6161
<Button danger size="sm" style={{ height: 'min-content' }}>Danger sm</Button>
6262
<Button danger size="md" style={{ height: 'min-content' }}>Danger md</Button>
@@ -85,7 +85,7 @@ import MdxCardFooter from '../MdxCardFooter'
8585
<div style={{ padding: '32px 24px' }}>
8686
<div style={{ width: '100%' }}>
8787
<div
88-
style={{ display: 'flex', gap: '12px', marginBottom: '16px' }}
88+
style={{ display: 'flex',flexWrap:'wrap', gap: '12px', marginBottom: '16px' }}
8989
>
9090
<Button disabled variant="primary" style={{ height: 'min-content' }}>Primary disabled</Button>
9191
<Button disabled style={{ height: 'min-content' }}>Default disabled</Button>
@@ -109,7 +109,7 @@ import MdxCardFooter from '../MdxCardFooter'
109109
<div style={{ padding: '32px 24px' }}>
110110
<div style={{ width: '100%' }}>
111111
<div
112-
style={{ display: 'flex', gap: '12px', marginBottom: '16px' }}
112+
style={{ display: 'flex',flexWrap: 'wrap', gap: '12px', marginBottom: '16px' }}
113113
>
114114
<Button
115115
icon={
@@ -224,7 +224,7 @@ import MdxCardFooter from '../MdxCardFooter'
224224
<div style={{ padding: '32px 24px' }}>
225225
<div style={{ width: '100%' }}>
226226
<div
227-
style={{ display: 'flex', gap: '12px', marginBottom: '16px' }}
227+
style={{ display: 'flex', gap: '12px', marginBottom: '16px', flexWrap: 'wrap' }}
228228
>
229229
<Button
230230
colors={{
@@ -257,7 +257,7 @@ import MdxCardFooter from '../MdxCardFooter'
257257
</Button>
258258
</div>
259259
<div
260-
style={{ display: 'flex', gap: '12px', marginBottom: '16px' }}
260+
style={{ display: 'flex', gap: '12px', marginBottom: '16px', flexWrap: 'wrap' }}
261261
>
262262
<Button
263263
colors={{
@@ -291,7 +291,7 @@ import MdxCardFooter from '../MdxCardFooter'
291291

292292
</div>
293293
<div
294-
style={{ display: 'flex', gap: '12px', marginBottom: '16px' }}
294+
style={{ display: 'flex', gap: '12px', marginBottom: '16px', flexWrap: 'wrap' }}
295295
>
296296
<Button
297297
colors={{

apps/landing/src/app/(detail)/components/layout.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ export default function Layout({
1414
<LeftMenu />
1515
</Box>
1616
</Box>
17-
<Box className="markdown-body" overflow="hidden" px="60px" py="40px">
17+
<Box
18+
className="markdown-body"
19+
overflow="hidden"
20+
px={['16px', null, '60px']}
21+
py={['24px', null, '40px']}
22+
>
1823
{children}
1924
</Box>
2025
<Box display={['none', null, null, null, null, 'initial']}>

0 commit comments

Comments
 (0)