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

feat: add slot to gain control over tabs switching buttons #1523

Merged
merged 4 commits into from
Sep 18, 2023
Merged

feat: add slot to gain control over tabs switching buttons #1523

merged 4 commits into from
Sep 18, 2023

Conversation

OlkaB
Copy link
Contributor

@OlkaB OlkaB commented Aug 30, 2023

Contributes to #1522

## What did you do?
Added slot to customise tab switching buttons' content

How have you tested it?

added test for slot in CvTabs.spec.js

Were docs updated if needed?

  • Yes

sample:
image

@OlkaB OlkaB marked this pull request as ready for review August 30, 2023 20:08
@davidnixon
Copy link
Collaborator

I like this solution but I think using the label is a problem. The Label would often be localized so the "House" label might become "Taigh" or "Maison" or "Casa". Could you use the id instead?

@OlkaB
Copy link
Contributor Author

OlkaB commented Sep 5, 2023

fair point - change applied

Copy link
Collaborator

@davidnixon davidnixon left a comment

Choose a reason for hiding this comment

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

sooooooo close:
"To customise tab look, in CvTabs component use scoped slot named with tab's label. Example: current tab has label "House", so the code for customising tab looks like:"

need to switch text to id 😄

@OlkaB
Copy link
Contributor Author

OlkaB commented Sep 12, 2023

oh gosh - truly. Done, thanks @davidnixon

Copy link
Collaborator

@davidnixon davidnixon left a comment

Choose a reason for hiding this comment

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

Thanks!

@davidnixon davidnixon merged commit 3f9fa50 into carbon-design-system:vNext Sep 18, 2023
5 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.

None yet

2 participants