Skip to content

Commit

Permalink
Handle PR feedback.
Browse files Browse the repository at this point in the history
  • Loading branch information
atmgrifter00 committed Oct 18, 2024
1 parent 6d326b0 commit b1ef8ee
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 5 deletions.
2 changes: 1 addition & 1 deletion packages/nimble-components/src/anchor-tab/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const template: FoundationElementTemplate<
ViewTemplate<AnchorTab>,
TabOptions
> = (context, definition) => html<AnchorTab>`
<template slot="tab" role="tab" aria-disabled="${x => x.disabled}">
<template slot="anchortab" role="tab" aria-disabled="${x => x.disabled}">
<a
download="${x => x.download}"
href=${x => (x.disabled ? null : x.href)}
Expand Down
5 changes: 5 additions & 0 deletions packages/nimble-components/src/anchor-tabs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,11 @@ export class AnchorTabs extends FoundationElement {
*/
public readonly leftScrollButton!: Element;

/**
* @internal
*/
public readonly tabSlotName = 'anchortab';

private readonly tabListResizeObserver: ResizeObserver;
private tabIds: string[] = [];

Expand Down
6 changes: 3 additions & 3 deletions packages/nimble-components/src/anchor-tabs/specs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ We cannot extend FAST's tabs control because it has baked into it the idea that
- _CSS Classes and CSS Custom Properties that affect the component_ - None
- _Slots_
- `start` - content placed to the left of tab list
- `tab` - slot for anchor tab elements
- `anchortab` - slot for anchor tab elements
- `end` - content placed to the right of tab list

#### Anchor Tab
Expand Down Expand Up @@ -87,7 +87,7 @@ We cannot extend FAST's tabs control because it has baked into it the idea that
<template>
<slot name="start"></slot>
<div role="tablist">
<slot name="tab"></slot>
<slot name="anchortab"></slot>
</div>
<slot name="end"></slot>
</template>
Expand All @@ -96,7 +96,7 @@ We cannot extend FAST's tabs control because it has baked into it the idea that
#### Anchor Tab

```html
<template slot="tab">
<template slot="anchortab">
<div role="tab">
<a>
<slot></slot>
Expand Down
2 changes: 1 addition & 1 deletion packages/nimble-components/src/patterns/tabs/template.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ TabsOptions
role="tablist"
${ref('tablist')}
>
<slot class="tab" name="tab" part="tab" ${slotted('tabs')}>
<slot class="tab" name="${x => x.tabSlotName}" part="tab" ${slotted('tabs')}>
</slot>
</div>
${when(x => x.showScrollButtons, html<Tabs>`
Expand Down
5 changes: 5 additions & 0 deletions packages/nimble-components/src/tabs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ export class Tabs extends FoundationTabs {
*/
public readonly leftScrollButton!: Element;

/**
* @internal
*/
public readonly tabSlotName = 'tab';

private readonly tabListResizeObserver: ResizeObserver;

public constructor() {
Expand Down

0 comments on commit b1ef8ee

Please sign in to comment.