-
Notifications
You must be signed in to change notification settings - Fork 171
Expand file tree
/
Copy pathButtonColorTokens.macos.ts
More file actions
96 lines (94 loc) · 3.53 KB
/
ButtonColorTokens.macos.ts
File metadata and controls
96 lines (94 loc) · 3.53 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
import type { Theme } from '@fluentui-react-native/framework';
import type { TokenSettings } from '@fluentui-react-native/use-styling';
import type { ButtonTokens } from './Button.types';
export const defaultButtonColorTokens: TokenSettings<ButtonTokens, Theme> = (t: Theme) =>
({
backgroundColor: t.colors.defaultBackground,
color: t.colors.defaultContent,
borderColor: t.colors.defaultBorder,
iconColor: t.colors.defaultContent,
disabled: {
backgroundColor: t.colors.defaultDisabledBackground,
color: t.colors.defaultDisabledContent,
borderColor: t.colors.defaultDisabledBorder,
iconColor: t.colors.defaultDisabledIcon,
},
hovered: {
backgroundColor: t.colors.defaultBackground,
color: t.colors.defaultContent,
borderColor: t.colors.defaultBorder,
iconColor: t.colors.defaultHoveredIcon,
},
pressed: {
backgroundColor: t.colors.defaultPressedBackground,
color: t.colors.defaultPressedContent,
borderColor: t.colors.defaultBorder,
iconColor: t.colors.defaultPressedIcon,
},
focused: {
backgroundColor: t.colors.defaultFocusedBackground,
color: t.colors.defaultFocusedContent,
borderColor: t.colors.defaultFocusedBorder,
icon: t.colors.defaultFocusedIcon,
},
primary: {
backgroundColor: t.colors.brandBackground,
color: t.colors.neutralForegroundOnBrand,
borderColor: t.colors.brandStroke1,
iconColor: t.colors.neutralForegroundOnBrand,
disabled: {
backgroundColor: t.colors.neutralBackgroundDisabled,
color: t.colors.neutralForegroundDisabled,
borderColor: t.colors.neutralStrokeDisabled,
iconColor: t.colors.neutralForegroundDisabled,
},
hovered: {
backgroundColor: t.colors.brandBackgroundHover,
color: t.colors.neutralForegroundOnBrandHover,
borderColor: t.colors.brandBackgroundHover,
iconColor: t.colors.neutralForegroundOnBrandHover,
},
pressed: {
backgroundColor: t.colors.brandBackgroundPressed,
color: t.colors.neutralForegroundOnBrandPressed,
borderColor: t.colors.brandBackgroundPressed,
iconColor: t.colors.neutralForegroundOnBrandPressed,
},
focused: {
backgroundColor: t.colors.brandBackgroundHover,
color: t.colors.neutralForegroundOnBrandHover,
borderColor: t.colors.strokeFocus2,
iconColor: t.colors.neutralForegroundOnBrandHover,
},
},
subtle: {
backgroundColor: t.colors.ghostBackground,
color: t.colors.ghostContent,
borderColor: t.colors.ghostBorder,
iconColor: t.colors.ghostIcon,
disabled: {
color: t.colors.ghostDisabledContent,
borderColor: t.colors.ghostDisabledBorder,
backgroundColor: t.colors.ghostDisabledBackground,
iconColor: t.colors.ghostDisabledIcon,
},
hovered: {
backgroundColor: t.colors.ghostHoveredBackground,
color: t.colors.ghostHoveredContent,
borderColor: t.colors.ghostHoveredBorder,
iconColor: t.colors.ghostHoveredIcon,
},
pressed: {
backgroundColor: t.colors.ghostPressedBackground,
borderColor: t.colors.ghostPressedBorder,
color: t.colors.ghostPressedContent,
icon: t.colors.ghostPressedIcon,
},
focused: {
borderColor: t.colors.ghostFocusedBorder,
backgroundColor: t.colors.ghostFocusedBackground,
color: t.colors.ghostFocusedContent,
icon: t.colors.ghostFocusedIcon,
},
},
} as ButtonTokens);