import rockey from 'rockey-react';
const Component = rockey(BaseComponent)`
Now Component could used as React component:
Or extend it and create anonymous child component with additional styles:
const Child = Component`
By default rockey-react try to use BaseComponent.displayName to generate classname. But sometimes it is more useful to set name manually.
const Child = Component('MySuperChild')`
And same usage for Child component.
There will be generated two CSS classes for Child:
Child component className will be composed of class with its own CSS rules and all parents class names.
... read the whole story at medium.com.