-
Notifications
You must be signed in to change notification settings - Fork 11
Expand file tree
/
Copy pathOffset.tsx
More file actions
38 lines (33 loc) · 1.07 KB
/
Offset.tsx
File metadata and controls
38 lines (33 loc) · 1.07 KB
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
31
32
33
34
35
36
37
38
import React from 'react';
import { Row, Col } from '@tiny-design/react';
export default function OffsetDemo() {
const row = {
margin: '16px 0',
};
const box = {
padding: '20px 0',
color: '#fff',
textAlign: 'center',
};
const lighterBox = {
backgroundColor: 'color-mix(in srgb, var(--ty-color-primary) 84%, transparent)',
};
const darkerBox = {
backgroundColor: 'color-mix(in srgb, var(--ty-color-primary) 98%, transparent)',
};
return (
<>
<Row style={row}>
<Col span={12} offset={6}><div style={{...box, ...lighterBox}}>col-12 col-offset-6</div></Col>
</Row>
<Row style={row}>
<Col span={8}><div style={{...box, ...darkerBox}}>col-8</div></Col>
<Col span={8} offset={8}><div style={{...box, ...lighterBox}}>col-8 col-offset-8</div></Col>
</Row>
<Row style={row}>
<Col span={6} offset={6}><div style={{...box, ...darkerBox}}>col-6 col-offset-6</div></Col>
<Col span={6} offset={6}><div style={{...box, ...lighterBox}}>col-6 col-offset-6</div></Col>
</Row>
</>
);
}