Skip to content
This repository was archived by the owner on Sep 20, 2024. It is now read-only.

Commit fe36224

Browse files
Merge pull request #297 from gbschalch/patch-1
chore(theme): Simplifying chakra.js structure
2 parents 3395901 + 00e6175 commit fe36224

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/nuxt-chakra/lib/plugin.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
import Vue from 'vue'
22
import { createClientDirective } from '@chakra-ui/vue/src/directives'
33

4+
const theme = <%= JSON.stringify(options.theme, null, 2) %>
5+
46
Vue.prototype.$chakra = {
5-
theme: <%= JSON.stringify(options.theme, null, 2) %>,
7+
theme,
68
icons: <%= JSON.stringify(options.icons, null, 2) %>
79
}
810

9-
Vue.directive('chakra', createClientDirective(<%= JSON.stringify(options.theme, null, 2) %>))
11+
Vue.directive('chakra', createClientDirective(theme))
1012

1113
if (process.client) {
1214
// Toast

0 commit comments

Comments
 (0)