react-native-svg
Version:
SVG library for react-native
16 lines (14 loc) • 490 B
JavaScript
import { StyleSheet } from 'react-native-web';
// Kept in separate file, to avoid name collision with Symbol element
export function resolve(styleProp, cleanedProps) {
if (styleProp) {
return StyleSheet
? [styleProp, cleanedProps]
: // Compatibility for arrays of styles in plain react web
styleProp[Symbol.iterator]
? Object.assign({}, ...styleProp, cleanedProps)
: Object.assign({}, styleProp, cleanedProps);
} else {
return cleanedProps;
}
}