vuetify
vuetify copied to clipboard
[Bug Report][3.0.0-beta.10] Example code for custom theme not working
Environment
Vuetify Version: 3.0.0-beta.10 Vue Version: 3.2.38 Browsers: Chrome 105.0.0.0 OS: Windows 10
Steps to reproduce
Add the code from https://next.vuetifyjs.com/en/features/theme/ About ThemeDefinition. This will not work. and give a Missing initializer in const declaration.. Sorry i did not make reproduction but it is plane simple. just add the code i added:
export default createVuetify({ theme: { defaultTheme: 'myCustomLightTheme', themes: { myCustomLightTheme, } } })
const myCustomLightTheme: ThemeDefinition = { dark: false, colors: { background: '#FFFFFF', surface: '#FFFFFF', primary: '#6200EE', 'primary-darken-1': '#3700B3', secondary: '#03DAC6', 'secondary-darken-1': '#018786', error: '#B00020', info: '#2196F3', success: '#4CAF50', warning: '#FB8C00', } }
Expected Behavior
Actual Behavior
Reproduction Link
https://codesandbox.io/embed/vue-3-glziy?fontsize=14&hidenavigation=1&theme=dark
Other comments
export default createVuetify({ theme: { defaultTheme: 'myCustomLightTheme', themes: { myCustomLightTheme, } } })
const myCustomLightTheme: ThemeDefinition = { dark: false, colors: { background: '#FFFFFF', surface: '#FFFFFF', primary: '#6200EE', 'primary-darken-1': '#3700B3', secondary: '#03DAC6', 'secondary-darken-1': '#018786', error: '#B00020', info: '#2196F3', success: '#4CAF50', warning: '#FB8C00', } }
The example is using typescript.
Aha would be nice to have a js version also sincse most documation is js and not ts
I will take a look at this :) A PR will be available in a couple of hours most likely.