-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
fix: added rel prop in switcher item #17059
fix: added rel prop in switcher item #17059
Conversation
✅ Deploy Preview for v11-carbon-react ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for carbon-elements ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Just one question
/** | ||
* The rel property for the link. | ||
*/ | ||
rel?: string; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a specific type off of HTMLAttributes or DOMAttributes or something that we could use here? It's not any string - it's one of a specific set of allowed/expected strings, right?
MDN's list is "some of the most important existing keywords" 🤔 very possible this doesn't exist but figured I'd ask
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes we cannot add any string there are some specific keywords that can be used . What do you think should I create an interface and made rel at that type ??
e3a8267
Closes #17052
Added optional 'rel' prop to
BaseSwitcherItemProps
.New
Added rel prop to
BaseSwitcherItemProps
Testing / Reviewing
Test the usage of
SwitcherItem
with therel
prop in a TypeScript environment within aSwitcher
component. Verify that the TypeScript compiler should not throw error and the component renders without errors and correctly applies the providedrel
attribute