diff --git a/apps/showcase/components/layout/designer/component/DesignComponent.vue b/apps/showcase/components/layout/designer/component/DesignComponent.vue index ae1181351..b1374bd6c 100644 --- a/apps/showcase/components/layout/designer/component/DesignComponent.vue +++ b/apps/showcase/components/layout/designer/component/DesignComponent.vue @@ -2,7 +2,7 @@
{{ componentKey }}
@@ -12,12 +12,12 @@
- +
- +
diff --git a/apps/showcase/components/layout/designer/component/DesignComponentSection.vue b/apps/showcase/components/layout/designer/component/DesignComponentSection.vue index 38b96d7dc..155395693 100644 --- a/apps/showcase/components/layout/designer/component/DesignComponentSection.vue +++ b/apps/showcase/components/layout/designer/component/DesignComponentSection.vue @@ -7,7 +7,7 @@
@@ -19,15 +19,7 @@ export default { type: null, default: null }, - name: { - type: null, - default: null - }, - parentPath: { - type: null, - default: null - }, - colorScheme: { + path: { type: null, default: null } @@ -66,17 +58,16 @@ export default { } }, computed: { - fullPath() { - return this.parentPath ? this.parentPath + '.' + this.name : this.name; - }, sectionName() { - const names = this.fullPath.split('.'); + const names = this.path.split('.'); - return names.map((n) => this.capitalize(this.camelCaseToSpaces(n))).join(' '); + return names + .filter((n) => n !== 'colorScheme' && n !== 'light' && n !== 'dark') + .map((n) => this.capitalize(this.camelCaseToSpaces(n))) + .join(' '); }, tokens() { - if (this.colorScheme) return this.getObjectProperty(this.$preset.components[this.componentKey].colorScheme[this.colorScheme], this.fullPath); - else return this.getObjectProperty(this.$preset.components[this.componentKey], this.fullPath); + return this.getObjectProperty(this.$preset.components[this.componentKey], this.path); }, nestedTokens() { const groups = {};