refactor: puritu
This commit is contained in:
parent
476e5568d0
commit
5b5ac467c4
10
index.js
10
index.js
|
@ -53,7 +53,7 @@ const mapStyleRulesTree = (rules, id) => rules.map((rule) => {
|
|||
};
|
||||
});
|
||||
|
||||
export default function Stylist(Component, styles) {
|
||||
export default function contempo(styles) { return function (Component) {
|
||||
if (!Array.isArray(styles)) {
|
||||
styles = [styles];
|
||||
}
|
||||
|
@ -70,15 +70,15 @@ export default function Stylist(Component, styles) {
|
|||
}
|
||||
|
||||
if (Component.prototype.render) {
|
||||
class StylistComponent extends Component {
|
||||
class ContempoComponent extends Component {
|
||||
}
|
||||
StylistComponent.prototype.render = createRenderFunction(
|
||||
ContempoComponent.prototype.render = createRenderFunction(
|
||||
Component, Component.prototype.render
|
||||
);
|
||||
return StylistComponent;
|
||||
return ContempoComponent;
|
||||
}
|
||||
else {
|
||||
return createRenderFunction(Component, Component);
|
||||
}
|
||||
}
|
||||
}}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user