MCPcopy
hub / github.com/mcnamee/react-native-starter-kit / cssifyTheme

Function cssifyTheme

native-base-theme/components/index.js:220–244  ·  view source on GitHub ↗
(grandparent, parent, parentKey)

Source from the content-addressed store, hash-verified

218 };
219
220 const cssifyTheme = (grandparent, parent, parentKey) => {
221 _.forEach(parent, (style, styleName) => {
222 if (
223 styleName.indexOf('.') === 0 &&
224 parentKey &&
225 parentKey.indexOf('.') === 0
226 ) {
227 if (grandparent) {
228 if (!grandparent[styleName]) {
229 grandparent[styleName] = {};
230 } else {
231 grandparent[styleName][parentKey] = style;
232 }
233 }
234 }
235 if (
236 style &&
237 typeof style === 'object' &&
238 styleName !== 'fontVariant' &&
239 styleName !== 'transform'
240 ) {
241 cssifyTheme(parent, style, styleName);
242 }
243 });
244 };
245
246 cssifyTheme(null, theme, null);
247

Callers 1

index.jsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected