-
Notifications
You must be signed in to change notification settings - Fork 844
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
EuiBadge should allow for href
#2831
Comments
Hi @aryamanpuri , yes please do! Essentially the component needs to accept an
You can essentially look at how EuiButton handles the render: eui/src/components/button/button.tsx Lines 168 to 195 in f11ea60
And we have two helper services for the TS types you can reuse similar to EuiButton here: eui/src/components/button/button.tsx Lines 79 to 96 in f11ea60
Be sure to check the whole file as not everything was captured in those permalinks. Thanks! |
may I work on this? |
I checked the code, button component is already sufficient to handle render of anchor or button based on the href prop, so just I need to add the optional href in the badge prop and add it to the button . |
The EuiButton component does correclty handle this situation, but we essentially need to translate that same type of code to EuiBadge to handle it as well since EuiBadge does not extend EuiButton. |
Hi @cchaos , I was looking at the EuiButton component and was wondering what does exclusive union does? |
@RisingGeek There's a good, full description of The idea is that we needed a way for a component with multiple potential element targets to ensure that the attributes for those discrete elements don't get mixed. For instance, a simple union of |
okay will try to do that |
Got it. Thanks |
@cchaos |
Hi @Mallik813 , I'm currently working on this. Could you please check some other issue |
@shakti97 sure! |
@shakti97 May I take over this issue? |
@chandlerprall may i take this issue now? |
@anishagg17 Go ahead |
@cchaos can I go for cleaning badge groups too?? |
EuiBadgeGroup doesn't actually contain any EuiBadge's. Only EuiBadge needs to be addressed by this issue. |
OKay , I would like to work on it @cchaos |
Currently it only accepts
onClick
but badges can also link to other pages as well. It should accepthref
similar to EuiButton.The text was updated successfully, but these errors were encountered: