-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathExplicitColumns.tsx
More file actions
30 lines (28 loc) · 978 Bytes
/
ExplicitColumns.tsx
File metadata and controls
30 lines (28 loc) · 978 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import React from 'react';
import { Card, Grid, Text } from '@tiny-design/react';
const panelStyle: React.CSSProperties = {
minHeight: 104,
padding: 16,
display: 'flex',
flexDirection: 'column',
justifyContent: 'space-between',
background: 'linear-gradient(180deg, color-mix(in srgb, var(--ty-color-primary) 12%, transparent), color-mix(in srgb, var(--ty-color-primary-bg) 70%, transparent))',
};
export default function ExplicitColumnsDemo() {
return (
<Grid columns="220px minmax(0, 1fr) 180px" gap="sm">
<Card style={panelStyle}>
<Text strong>Sidebar</Text>
<Text type="secondary">Fixed 220px track</Text>
</Card>
<Card style={panelStyle}>
<Text strong>Main content</Text>
<Text type="secondary">Fluid `minmax(0, 1fr)` track</Text>
</Card>
<Card style={panelStyle}>
<Text strong>Inspector</Text>
<Text type="secondary">Fixed 180px track</Text>
</Card>
</Grid>
);
}