14 lines
376 B
JavaScript
14 lines
376 B
JavaScript
|
import Component from './component.js';
|
||
|
|
||
|
export function wrapComponents(Components) {
|
||
|
return Components
|
||
|
.reduce((Components, [componentName, properties]) => {
|
||
|
return {
|
||
|
...Components,
|
||
|
[componentName]: class extends Component {
|
||
|
static componentName = componentName;
|
||
|
static properties = properties;
|
||
|
},
|
||
|
};
|
||
|
}, {})
|
||
|
}
|