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

changing some props in custom theme has no effect #157

Open
zorx opened this issue Oct 4, 2023 · 4 comments
Open

changing some props in custom theme has no effect #157

zorx opened this issue Oct 4, 2023 · 4 comments
Labels
bug Something isn't working

Comments

@zorx
Copy link

zorx commented Oct 4, 2023

Describe the bug

I'm trying to implement my own theme following the documentation. However, there are certain parameters that are not being considered, such as UButton "size," "color", "intent" etc.

But when i change UButton "rounded" for example, it works...

To Reproduce

// main
...
import nuxtLabsTheme from './customTheme'

import { createUI } from 'nuxt-ui-vue'

import App from './App.vue'

const app = createApp(App)

const UI = createUI({
  registerComponents: false,
})

app.use(UI, nuxtLabsTheme)

...
// customTheme
export default {
 ...
 UButton: {
    base : {
     ....
       default : {
         ...
         color: "red" <------------------------
       }
    }
 }

Expected behavior
the default color of a button must be red, or i still have a green button

@selemondev
Copy link
Owner

Have you tried customizing the color of the UButton component using the color prop like this:

 <UButton color="red">
      Button
 </UButton>

@zorx
Copy link
Author

zorx commented Oct 8, 2023

i know that i can change the color using the attribute, but what i want is to change the default color, and other stuff using the theme file, which seems to be impossible.

your are using the default theme nuxtLabsTheme to load some configs, and not the one we set when we app.use(UI, theme)

@selemondev
Copy link
Owner

This issue will be resolved in the next release 😄.

@selemondev selemondev added the bug Something isn't working label Oct 8, 2023
@sirmathays
Copy link

sirmathays commented Nov 20, 2023

Yep, I noticed the same a while ago and after looking around the code I noticed in many components there were direct references to the nuxtLabsTheme located in the package's own files which essentially makes setting your own theme file redundant.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants