styled-components v2-3 support
- [x] Support all new API
- [x] Add support to set className
- [ ] Add option prefix to set
<sc:ComponentName>instead of<ComponentName>
Add .withConfig({ componentId: 'Name', displayName: 'Name' })
https://github.com/styled-components/babel-plugin-styled-components/blob/a4ce86b1fe63387fbf89fd35dd3a2d41da735ec4/src/visitors/displayNameAndId.js#L24
.withConfig({ displayName: 'sc:Name' })
renders as:
<div class="sc:Name-cCfHun dmWRtX" />
But that
.withConfig({ displayName: 'sc:Name', componentId: 'sc:Name' })
renders as:
<div class="sc:Name-sc:Name dmWRtX" />
Use detectors from: https://github.com/styled-components/babel-plugin-styled-components/blob/a4ce86b1fe63387fbf89fd35dd3a2d41da735ec4/src/utils/detectors.js#L16
and add withConfig from: https://github.com/styled-components/babel-plugin-styled-components/blob/a4ce86b1fe63387fbf89fd35dd3a2d41da735ec4/src/visitors/displayNameAndId.js#L9
4cb395b34c3e6f0ce846a41cc73fcf9894a1cfba