Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function createNativeElement({ node, stylesheet, key, defaultColor, fontFamily, fontSize = 12 }) {
const { properties, type, tagName: TagName, value } = node;
const startingStyle = { fontFamily, fontSize, height: fontSize + 5 };
if (type === 'text') {
return (
);
} else if (TagName) {
const childrenCreator = createChildren({ stylesheet, fontSize, fontFamily });
const style = createStyleObject(
properties.className,
Object.assign(
{ color: defaultColor },
properties.style,
startingStyle
),
stylesheet
);
const children = childrenCreator(node.children, style.color || defaultColor);
return ;
}
}