-
Notifications
You must be signed in to change notification settings - Fork 163
/
Copy pathButton.settings.android.ts
93 lines (91 loc) · 2.31 KB
/
Button.settings.android.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
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
import type { IViewProps } from '@fluentui-react-native/adapters';
import type { IComposeSettings } from '@uifabricshared/foundation-compose';
import type { IButtonType } from './Button.types';
import { buttonName } from './Button.types';
/**
* @deprecated This will be removed when the package moves to 1.0.0.
* Please see MIGRATION.md for details on how to move to the new Button.
*/
export const settings: IComposeSettings<IButtonType> = [
{
tokens: {
backgroundColor: 'buttonBackground',
color: 'buttonText',
borderColor: 'buttonBorder',
borderWidth: 1,
borderRadius: 12,
},
root: {
accessible: false,
focusable: false,
style: {
display: 'flex',
alignItems: 'flex-start',
flexDirection: 'row',
alignSelf: 'flex-start',
overflow: 'hidden',
},
} as IViewProps,
ripple: {
accessible: true,
focusable: true,
accessibilityRole: 'button',
android_ripple: {
color: 'buttonBackgroundPressed',
},
},
content: {
variant: 'bodySemibold',
},
startIcon: {
style: {
marginEnd: 10,
},
},
stack: {
style: {
display: 'flex',
paddingVertical: 14,
paddingHorizontal: 20,
alignItems: 'center',
flexDirection: 'row',
alignSelf: 'flex-start',
minHeight: 52,
minWidth: 80,
justifyContent: 'center',
},
},
_precedence: ['hovered', 'focused', 'pressed', 'disabled'],
_overrides: {
disabled: {
tokens: {
backgroundColor: 'buttonBackgroundDisabled',
color: 'buttonTextDisabled',
borderColor: 'buttonBorderDisabled',
},
},
hovered: {
tokens: {
backgroundColor: 'buttonBackgroundHovered',
color: 'buttonTextHovered',
borderColor: 'buttonBorderHovered',
},
},
pressed: {
tokens: {
backgroundColor: 'buttonBackgroundPressed',
color: 'buttonTextPressed',
borderColor: 'buttonPressedBorder',
},
},
focused: {
tokens: {
borderColor: 'buttonBorderFocused',
color: 'buttonTextHovered',
backgroundColor: 'buttonBackgroundHovered',
},
},
},
},
buttonName,
];