mirror of
https://github.com/zoriya/react-native-svg.git
synced 2026-05-24 11:44:39 +00:00
refactor: optimize propsAndStyles
This commit is contained in:
@@ -17,10 +17,12 @@ import { Component } from 'react';
|
||||
|
||||
export function propsAndStyles(props: Object & { style?: [] | {} }) {
|
||||
const { style } = props;
|
||||
return {
|
||||
...(Array.isArray(style) ? Object.assign({}, ...style) : style),
|
||||
...props,
|
||||
};
|
||||
return !style
|
||||
? props
|
||||
: {
|
||||
...(Array.isArray(style) ? Object.assign({}, ...style) : style),
|
||||
...props,
|
||||
};
|
||||
}
|
||||
|
||||
function getMarker(marker?: string) {
|
||||
|
||||
Reference in New Issue
Block a user