-
-
Notifications
You must be signed in to change notification settings - Fork 98
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add target attribute to menu items #185
Comments
I can submit a PR for this, but I guess https://github.com/huntabyte/bits-ui would be the right place for it, right @huntabyte? |
Hey @leonardsimonse, it would be in During this refactor I did notice that we're typing the Menu items incorrectly when converting to links right now. They should be similar to how we handle the |
Getting the types in line with an anchor element would be the proper solution indeed @huntabyte. Let's wait for your merge. |
Okay, the big PR has been merged so we can revisit this! I think ideally we do something similar to how we're handling it with the Except the dropdown menu items aren't buttons, rather |
I'd love to help out here. If you assign it me, I'll look at it in a couple of hours. |
I think you already solved this @huntabyte at a2d2453#diff-2174b491375649b1e4b5ec28c468c52721fd9f5af9efd38aacb1db724bd63318R35 👊 |
Wow I guess I did! My apologies 😅 lots of changes in that one! Thanks for taking a look anyways! Closed by #184 |
Describe the feature in detail (code, mocks, or screenshots encouraged)
TypeScript gives the following error if you try to add a target attribute to a DropdownMenu.Item component if it's a link (adding the href attribute):
Type '{ target: string; href: string; }' is not assignable to type '$$Props'. Object literal may only specify known properties, and '"target"' does not exist in type '$$Props'. ts(2322)
An
a
element should have support for the target attributeWhat type of pull request would this be?
Enhancement
Provide relevant links or additional information.
No response
The text was updated successfully, but these errors were encountered: