-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Expand file tree
/
Copy pathListItemMultiSelectButton.styles.ts
More file actions
80 lines (76 loc) · 1.86 KB
/
ListItemMultiSelectButton.styles.ts
File metadata and controls
80 lines (76 loc) · 1.86 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
// Third party dependencies.
import { StyleSheet, ViewStyle } from 'react-native';
// External dependencies.
import { Theme } from '../../../util/theme/models';
// Internal dependencies.
import { ListItemMultiSelectButtonStyleSheetVars } from './ListItemMultiSelectButton.types';
/**
* Style sheet function for ListItemSelect component.
*
* @param params Style sheet params.
* @param params.theme App theme from ThemeContext.
* @param params.vars Inputs that the style sheet depends on.
* @returns StyleSheet object.
*/
const styleSheet = (params: {
theme: Theme;
vars: ListItemMultiSelectButtonStyleSheetVars;
}) => {
const { vars, theme } = params;
const { colors } = theme;
const { style, isDisabled, isSelected } = vars;
return StyleSheet.create({
base: Object.assign(
{
flex: 1,
position: 'relative',
opacity: isDisabled ? 0.5 : 1,
padding: 16,
zIndex: 1,
} as ViewStyle,
style,
) as ViewStyle,
listItem: {
paddingRight: 0,
paddingTop: 0,
paddingBottom: 0,
paddingLeft: 0,
},
containerColumn: {
flexDirection: 'column',
alignItems: 'flex-start',
paddingRight: 0,
paddingTop: 0,
paddingBottom: 0,
paddingLeft: 0,
zIndex: 2,
},
containerRow: {
flexDirection: 'row',
alignItems: 'flex-start',
marginBottom: 0,
marginLeft: 40,
},
container: {
backgroundColor: isSelected
? colors.background.muted
: colors.background.default,
flexDirection: 'row',
alignItems: 'center',
},
itemColumn: {
display: 'flex',
marginTop: 0,
marginBottom: 0,
color: colors.text.alternative,
},
arrowStyle: {
paddingLeft: 8,
paddingTop: 32,
},
buttonIcon: {
paddingRight: 20,
},
});
};
export default styleSheet;