-
Import Figma Tokens
-
+
+ Load Theme
+ Continue editing the theme files stored locally.
+
OR
-
-
Saved Theme
-
+
+
+ Import Figma Tokens
+
+
+
Export the token studio json file and import to the Visual Editor. This feature is currently under development.
+
@@ -120,18 +126,9 @@ export default {
};
},
mounted() {
- const savedTheme = localStorage.getItem(this.$appState.designerKey);
-
- if (savedTheme) {
- this.preset = JSON.parse(savedTheme).defaultTheme;
- setTimeout(() => {
- usePreset(this.preset);
- }, 2000);
- } else {
- this.preset.semantic.primary = this.preset.primitive.emerald;
- this.preset.semantic.colorScheme.light.surface = { ...{ 0: '#ffffff' }, ...this.preset.primitive.slate };
- this.preset.semantic.colorScheme.dark.surface = { ...{ 0: '#ffffff' }, ...this.preset.primitive.zinc };
- }
+ this.preset.semantic.primary = this.preset.primitive.emerald;
+ this.preset.semantic.colorScheme.light.surface = { ...{ 0: '#ffffff' }, ...this.preset.primitive.slate };
+ this.preset.semantic.colorScheme.dark.surface = { ...{ 0: '#ffffff' }, ...this.preset.primitive.zinc };
},
methods: {
apply() {
@@ -194,6 +191,14 @@ app.mount("#app");
};
localStorage.setItem(this.$appState.designerKey, JSON.stringify(themeRecord));
+ },
+ loadFromLocalStorage() {
+ const savedTheme = localStorage.getItem(this.$appState.designerKey);
+
+ if (savedTheme) {
+ this.preset = JSON.parse(savedTheme).defaultTheme;
+ this.$toast.add({ severity: 'success', summary: 'Success', detail: 'Theme loaded to Designer', life: 3000 });
+ }
}
}
};
diff --git a/apps/showcase/components/layout/designer/DesignTokenField.vue b/apps/showcase/components/layout/designer/DesignTokenField.vue
index 40315a1fa..c62cfc00e 100644
--- a/apps/showcase/components/layout/designer/DesignTokenField.vue
+++ b/apps/showcase/components/layout/designer/DesignTokenField.vue
@@ -1,7 +1,22 @@
{{ label }}
@@ -9,6 +24,32 @@