mirror of
https://github.com/zoriya/react-native-svg.git
synced 2025-12-20 14:05:09 +00:00
22 lines
510 B
JavaScript
22 lines
510 B
JavaScript
import extractSpan from './extractSpan';
|
|
import extractTextContent from './extractTextContent';
|
|
|
|
export default function (props) {
|
|
let {children, line} = props;
|
|
let extractedProps = extractSpan(props);
|
|
|
|
if (typeof children === 'string') {
|
|
line = children;
|
|
children = null;
|
|
} else {
|
|
children = extractTextContent(props.children);
|
|
line = null;
|
|
}
|
|
console.log(extractedProps);
|
|
return {
|
|
...extractedProps,
|
|
children,
|
|
line
|
|
};
|
|
};
|