Luca Félix 9aaaf429d9 fix: 🐛 lift mode duplicate ids lead to incorrect behavior (#3433)
## Bug:

When clicking on the "Lift Mode" Text instead of the toggle itself, since there were multiple `lift-mode` ids before (one for each block), the incorrect toggle would be activated.

https://github.com/shadcn-ui/ui/assets/61006057/261ec82f-9274-4e0a-ac21-5e3aa3ceece3

## Fix:

Instead of the id being static I changes the `id`, as well as the `htmlFor` attributes to `lift-mode-${block.name}`. This prevents duplicate ids, as long as there are no two blocks with the same name.
2024-04-18 06:14:13 +00:00
2023-04-19 15:01:29 +04:00
2023-01-24 19:51:29 +04:00
2023-01-24 19:51:29 +04:00
2023-02-10 11:15:33 +04:00
2023-10-19 21:12:17 +04:00
2023-01-24 19:51:29 +04:00
2023-01-27 16:02:33 +04:00
2024-03-22 21:39:33 +04:00
2024-04-05 21:28:05 +04:00
2023-03-08 13:08:46 +04:00
2023-08-17 14:59:22 +04:00
2023-01-24 19:51:29 +04:00
2024-03-22 21:39:33 +04:00

shadcn/ui

Accessible and customizable components that you can copy and paste into your apps. Free. Open Source. Use this to build your own component library.

hero

Documentation

Visit http://ui.shadcn.com/docs to view the documentation.

Contributing

Please read the contributing guide.

License

Licensed under the MIT license.

Description
Languages
TypeScript 90.1%
MDX 6.5%
CSS 3.3%