mirror of https://github.com/astrit/css.gg.git
⚡️ (icons-styled-components): add icon role
This commit is contained in:
parent
e3cff55f45
commit
f10409eccd
|
|
@ -13,6 +13,7 @@ Object.keys(icons).forEach(k => {
|
|||
const result = mustache.render(iconsTpl.toString(), {
|
||||
styledname: `Styled${name}`,
|
||||
name,
|
||||
originalname: k,
|
||||
css,
|
||||
})
|
||||
fs.outputFileSync(path.resolve(__dirname, `../src/icons/${name}.tsx`), result)
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ const {{ styledname }} = styled.i`
|
|||
export const {{ name }} = React.forwardRef<HTMLElement, React.HTMLAttributes<HTMLElement>>((props, ref) => {
|
||||
return (
|
||||
<>
|
||||
<{{ styledname }} {...props} ref={ref} />
|
||||
<{{ styledname }} {...props} ref={ref} icon-role="{{originalname}}" />
|
||||
</>
|
||||
)
|
||||
})
|
||||
|
|
|
|||
Loading…
Reference in New Issue