lumada-design / hv-uikit-react

UI library for the Next Design System.
https://lumada-design.github.io/uikit/master
Apache License 2.0
39 stars 20 forks source link

Unable to override HvButton font color with variant=warning #4266

Open fookoo opened 1 month ago

fookoo commented 1 month ago

Which UI Kit version is this bug for?

v5.x

Latest version

No Hitachi confidential content

Current behavior 😯

const theme = createTheme({
  name: 'theme',
  base: 'ds5',
  inheritColorModes: true,
  components: {
    HvButton: {
      classes: {
        warning: {
          color: 'red'
        }
      }
    }
  }
})

it doesnt affect my <HvButton variant='warning'>Ok</HvButton>

works with "secondaryGhost" and others

Expected behavior 🤔

i would like to be able to override this

Your Environment 🌎

Build tool: Vite Device & OS: PC Linux Browser: Chrome

MEsteves22 commented 1 month ago

Hello @fookoo 👋

This is not working because the component doesn't have a warning class at the moment. Just to get a better understanding, do you want to change the color for all buttons with the warning variant in your app or only one specific component? If the latter, creating a specific component would be better. If the former, don't you want to change the warning color in your app globally and not just for the button? If so, overriding the color tokens is more appropriate. 🙏