static-cms/src/lib/registry.js
2016-09-11 17:53:44 +02:00

21 lines
402 B
JavaScript

const registry = {
templates: {},
previewStyles: []
};
export function registerPreviewStyle(style) {
registry.previewStyles.push(style);
}
export function registerPreviewTemplate(name, component) {
registry.templates[name] = component;
}
export function getPreviewTemplate(name) {
return registry.templates[name];
}
export function getPreviewStyles() {
return registry.previewStyles;
}