MCPcopy Create free account
hub / github.com/callstack/react-native-paper / getDynamicThemeElevations

Function getDynamicThemeElevations

src/core/theming.tsx:164–178  ·  view source on GitHub ↗
(scheme: MD3AndroidColors)

Source from the content-addressed store, hash-verified

162};
163
164export const getDynamicThemeElevations = (scheme: MD3AndroidColors) => {
165 const elevationValues = ['transparent', 0.05, 0.08, 0.11, 0.12, 0.14];
166 return elevationValues.reduce((elevations, elevationValue, index) => {
167 return {
168 ...elevations,
169 [`level${index}`]:
170 index === 0
171 ? elevationValue
172 : color(scheme.surface)
173 .mix(color(scheme.primary), elevationValue as number)
174 .rgb()
175 .string(),
176 };
177 }, {});
178};

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…