bernard-lin / babel-plugin-glamorous-displayname

A babel plugin for Glamorous displayNames 💄
http://npm.im/babel-plugin-glamorous-displayname
MIT License
32 stars 2 forks source link

Allow for exporting of individual glamorous components #8

Closed andrewdelprete closed 7 years ago

andrewdelprete commented 7 years ago

I've never worked with ASTs before so I'm not sure if this is the most elegant solution but It appears to work for the following:

const Logo = div.glamorous({ color: 'red' })

and

export const Logo2 = div.glamorous({ color: 'blue' })

Reference: Issue #7

https://astexplorer.net/#/gist/fba9b120be0b6b16e6f6a886060fcfe8/1b2f88b4ca4ac473b9f2cb2ebdc8ddb58b73d515