Files
react-native-svg/lib/extract/extractFrame.js
2016-08-30 09:37:38 +08:00

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
};
};