MCPcopy
hub / github.com/xotahal/react-native-material-ui / getTheme

Function getTheme

src/styles/getTheme.js:28–681  ·  view source on GitHub ↗
(theme, ...more)

Source from the content-addressed store, hash-verified

26}
27
28export default function getTheme(theme, ...more) {
29 let mergedTheme = merge(lightTheme, theme, ...more);
30
31 const { iconSet, spacing, fontFamily, typography, palette } = mergedTheme;
32 const baseTheme = {
33 iconSet,
34 spacing,
35 fontFamily,
36 typography,
37 palette,
38 };
39
40 mergedTheme = merge(
41 {
42 actionButton: StyleSheet.create(
43 merge(
44 {
45 positionContainer: {
46 position: 'absolute',
47 bottom: 20,
48 right: 20,
49 },
50 container: {
51 height: spacing.actionButtonSize,
52 width: spacing.actionButtonSize,
53 borderRadius: spacing.actionButtonSize / 2,
54 backgroundColor: palette.accentColor,
55 },
56 overlayContainer: {
57 ...StyleSheet.absoluteFillObject,
58 backgroundColor: Color('#fff')
59 .alpha(0.8)
60 .toString(),
61 // we need overlay to be above the toolbar - so maybe we could use some variable
62 // to get elevation for toolbar and this overlay
63 ...getPlatformElevation(4),
64 },
65 toolbarPositionContainer: {
66 position: 'absolute',
67 bottom: 0,
68 right: 0,
69 left: 0,
70 },
71 toolbarContainer: {
72 flex: 1,
73 height: spacing.actionButtonSize,
74 backgroundColor: palette.accentColor,
75 flexDirection: 'row',
76 },
77 toolbarActionContainer: {
78 flex: 1,
79 alignItems: 'center',
80 justifyContent: 'center',
81 },
82 speedDialContainer: {
83 alignItems: 'flex-end',
84 },
85 speedDialActionContainer: {

Callers 2

themeContext.jsFile · 0.85
getTheme.test.jsFile · 0.85

Calls 2

getPlatformElevationFunction · 0.70
darkenOrLightenFunction · 0.70

Tested by

no test coverage detected