/* eslint-disable react/react-in-jsx-scope,react/prop-types */
export const renderStyled = (Tag, data, children, attributes = {}) => {
  const style = data.get('style') || {}
  if (children) {
    return <Tag style={style} {...attributes}>{children}</Tag>
  }

  return <Tag style={style} {...attributes} />
}

export default renderStyled

@@ -73,238 +73,437 @@
 nst 
-renderStyled = (Tag, data, children, attributes = %7B%7D) =%3E %7B%0A  const style = data.get('style') %7C%7C %7B%7D%0A  if (children) %7B%0A    return %3CTag style=%7Bstyle%7D %7B...attributes%7D%3E%7Bchildren%7D%3C/Tag%3E%0A  %7D%0A%0A  return %3CTag style=%7Bstyle%7D %7B...attributes%7D /
+getStyleData = (%7B attribs, style %7D) =%3E %7B%0A%09if (attribs.style) debugger;%0A%09return %7B%0A%09%09className: (attribs.class %7C%7C '').split(' ').filter(cn =%3E cn).join(' '),%0A%09%09style: style %7C%7C %7B%7D,%0A%09%7D%0A%7D%0A%0Aexport const renderStyled = (Tag, data, children, attributes = %7B%7D) =%3E %7B%0A  const style = data.get('style') %7C%7C %7B%7D%0A  const className = data.get('className') %7C%7C undefined%0A%0A  return %3CTag %7B...attributes %7D %7B...%7B className, style %7D%7D%3E%7Bchildren %7C%7C %5B%5D%7D%3C/Tag
 %3E%0A%7D%0A

Add getStyleData function