Skip to content
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(16294): update interface to include target prop in SwitcherItem type #16295

Merged

Conversation

ahmedsemih
Copy link
Contributor

@ahmedsemih ahmedsemih commented May 1, 2024

Closes #16294

Added optional "target" prop to BaseSwitcherItemProps for specify where to open the link.

Changelog

New
Added target prop to BaseSwitcherItemProps

Testing / Reviewing

<Switcher aria-label='Switcher Container' expanded={true}>
    <SwitcherItem aria-label="Link 1" href="https://carbondesignsystem.com/" target='_blank' >
         Link 1
    </SwitcherItem>
</Switcher>

When used as above, the Typescript compiler was giving the error “Property ‘target’ does not exist on type ....” before I fixed it. Now there is no such error, it behaves like a normal anchor tag target property.

@ahmedsemih ahmedsemih requested review from a team as code owners May 1, 2024 05:43
Copy link
Contributor

github-actions bot commented May 1, 2024

All contributors have signed the DCO.
Posted by the DCO Assistant Lite bot.

@ahmedsemih
Copy link
Contributor Author

I have read the DCO document and I hereby sign the DCO.

Copy link

netlify bot commented May 1, 2024

Deploy Preview for v11-carbon-react ready!

Name Link
🔨 Latest commit 90b1eae
🔍 Latest deploy log https://app.netlify.com/sites/v11-carbon-react/deploys/66450a67334c7700084b5ab5
😎 Deploy Preview https://deploy-preview-16295--v11-carbon-react.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@ahmedsemih ahmedsemih changed the title fix(16294): update interface to include target prop in switcheritem type fix(16294): update interface to include target prop in SwitcherItem type May 1, 2024
Copy link
Contributor

@2nikhiltom 2nikhiltom left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, Thanks for the contribution.

@ahmedsemih ahmedsemih requested a review from a team as a code owner May 7, 2024 14:26
@guidari guidari added this pull request to the merge queue May 21, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 21, 2024
@alisonjoseph alisonjoseph added this pull request to the merge queue May 22, 2024
Merged via the queue into carbon-design-system:main with commit cfb682c May 22, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: TS error: target prop does not exist in SwitcherItem type
5 participants