This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
### Keybase proof | |
I hereby claim: | |
* I am sbadulin on github. | |
* I am sbadulin (https://keybase.io/sbadulin) on keybase. | |
* I have a public key ASDgLhgxHxzy9um-TjgiAQ3P7Evgo9tI1ZKn58dGBq7JOQo |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function iconTemplate({ template }, opts, { imports, componentName, props, jsx }) { | |
const typeScriptTpl = template.smart({ plugins: ['typescript'] }); | |
return typeScriptTpl.ast` | |
${imports} | |
import styled, { css } from 'styled-components'; | |
const SvgIcon = (${props}: React.SVGProps<SVGSVGElement>) => (props => ${jsx})({className: props.className}); | |
const ${componentName} = styled(SvgIcon)([], | |
({ theme, fill, width }) => css\` |