/
MantineStyleSystem.ts
60 lines (50 loc) · 2.16 KB
/
MantineStyleSystem.ts
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
import { CSSProperties } from 'react';
import { MantineColor } from './MantineColor';
import type { MantineNumberSize, MantineSize } from './MantineSize';
export type SystemProp<Value> = Value | Partial<Record<MantineSize | (string & {}), Value>>;
export type SpacingValue = MantineNumberSize | (string & {});
export interface MantineStyleSystemProps {
m?: SystemProp<SpacingValue>;
my?: SystemProp<SpacingValue>;
mx?: SystemProp<SpacingValue>;
mt?: SystemProp<SpacingValue>;
mb?: SystemProp<SpacingValue>;
ml?: SystemProp<SpacingValue>;
mr?: SystemProp<SpacingValue>;
p?: SystemProp<SpacingValue>;
py?: SystemProp<SpacingValue>;
px?: SystemProp<SpacingValue>;
pt?: SystemProp<SpacingValue>;
pb?: SystemProp<SpacingValue>;
pl?: SystemProp<SpacingValue>;
pr?: SystemProp<SpacingValue>;
bg?: SystemProp<MantineColor>;
c?: SystemProp<MantineColor>;
opacity?: SystemProp<CSSProperties['opacity']>;
ff?: SystemProp<CSSProperties['fontFamily']>;
fz?: SystemProp<SpacingValue>;
fw?: SystemProp<CSSProperties['fontWeight']>;
lts?: SystemProp<CSSProperties['letterSpacing']>;
ta?: SystemProp<CSSProperties['textAlign']>;
lh?: SystemProp<CSSProperties['lineHeight']>;
fs?: SystemProp<CSSProperties['fontStyle']>;
tt?: SystemProp<CSSProperties['textTransform']>;
td?: SystemProp<CSSProperties['textDecoration']>;
w?: SystemProp<CSSProperties['width']>;
miw?: SystemProp<CSSProperties['minWidth']>;
maw?: SystemProp<CSSProperties['maxWidth']>;
h?: SystemProp<CSSProperties['height']>;
mih?: SystemProp<CSSProperties['minHeight']>;
mah?: SystemProp<CSSProperties['maxHeight']>;
bgsz?: SystemProp<CSSProperties['backgroundSize']>;
bgp?: SystemProp<CSSProperties['backgroundPosition']>;
bgr?: SystemProp<CSSProperties['backgroundRepeat']>;
bga?: SystemProp<CSSProperties['backgroundAttachment']>;
pos?: SystemProp<CSSProperties['position']>;
top?: SystemProp<CSSProperties['top']>;
left?: SystemProp<CSSProperties['left']>;
bottom?: SystemProp<CSSProperties['bottom']>;
right?: SystemProp<CSSProperties['right']>;
inset?: SystemProp<CSSProperties['inset']>;
}
export type MantineStyleSystemSize = keyof MantineStyleSystemProps;