mirror of
https://github.com/nuxt/ui.git
synced 2026-09-14 19:51:10 +08:00
5cb65cfbd0
Co-authored-by: Hugo Richard <hugo.richard@epitech.eu>
20 lines
508 B
TypeScript
20 lines
508 B
TypeScript
export function useSharedData() {
|
|
const framework = useCookie('nuxt-ui-framework', { default: () => 'nuxt' })
|
|
const frameworks = computed(() => [{
|
|
label: 'Nuxt',
|
|
icon: 'i-simple-icons-nuxtdotjs',
|
|
value: 'nuxt',
|
|
onSelect: () => framework.value = 'nuxt'
|
|
}, {
|
|
label: 'Vue',
|
|
icon: 'i-simple-icons-vuedotjs',
|
|
value: 'vue',
|
|
onSelect: () => framework.value = 'vue'
|
|
}].map(f => ({ ...f, active: framework.value === f.value })))
|
|
|
|
return {
|
|
framework,
|
|
frameworks
|
|
}
|
|
}
|