nextui icon indicating copy to clipboard operation
nextui copied to clipboard

[BUG] - Select component and the Input component style inconsistently

Open pompurin404 opened this issue 1 year ago • 5 comments

          > * Flat: Currently the bg-color becomes darker on hover

I'm sorry, but I personally think there is an issue with this change, as it causes the Select component and the Input component to behave inconsistently.

recording

Originally posted by @pompurin404 in https://github.com/nextui-org/nextui/issues/3663#issuecomment-2380399790

pompurin404 avatar Oct 12 '24 15:10 pompurin404

++ @macci001

wingkwong avatar Oct 13 '24 03:10 wingkwong

Sorry @pompurin404, I was not able to have a look this on your previous mention. Will create a fix for this.

macci001 avatar Oct 13 '24 04:10 macci001

Hi @pompurin404, I have created the fix. This issue will be fixed in the coming version. Sorry for the inconvenience caused due to my previous PR.

Until the fix get's in, you can use this hack:

  • Add the classNames prop to the select: classNames={{trigger: "data-[hover=true]:bg-default-200"}}
  • Example of flat variant select component with the hack could be:
<Select variant={"flat"} classNames={{trigger: "data-[hover=true]:bg-default-200"}}>
      {items}
</Select>

macci001 avatar Oct 13 '24 09:10 macci001

Thank you very much!

ghost avatar Oct 13 '24 09:10 ghost