Skip to content

Commit

Permalink
fix(atomic): add separate part name for active tab (#4868)
Browse files Browse the repository at this point in the history
This PR adds distinct part names for active tab button and active tab
button container. This makes it possible to style them differently from
other buttons.

https://coveord.atlassian.net/browse/CDX-1604
  • Loading branch information
fpbrault authored Jan 20, 2025
1 parent 58a3119 commit 7c2491c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ export class AtomicTabButton {
class={`${this.activeTabClass}`}
aria-current={this.active ? 'true' : 'false'}
aria-label={'tab for ' + this.label}
part="button-container"
part={'button-container' + (this.active ? '-active' : '')}
>
<Button
class={`w-full truncate px-2 pb-1 text-xl sm:px-6 ${this.activeTabTextClass}`}
part="tab-button"
part={'tab-button' + (this.active ? '-active' : '')}
onClick={this.select}
style="text-transparent"
>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ import {Bindings} from '../../atomic-search-interface/atomic-search-interface';
* individual tab within the manager.
*
* @part button-container - The container for the tab button.
* @part button - The tab button.
* @part button-container-active - The container for the active tab button.
* @part tab-button - The tab button.
* @part tab-button-active - The container for the active tab button.
* @part dropdown-area - The dropdown area.
* @part tab-area - The tab area.
* @slot default
Expand Down

0 comments on commit 7c2491c

Please sign in to comment.