Skip to content

Commit

Permalink
fix(context-picker): tooltips
Browse files Browse the repository at this point in the history
  • Loading branch information
bennypowers committed Oct 9, 2024
1 parent 613e827 commit 31a0852
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/elements/rh-context-picker/rh-context-picker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,18 +84,19 @@ export class RhContextPicker extends LitElement {
class="visually-hidden">${this.#internals.computedLabelText}</div>
<div id="container"
@input="${this.#onInput}"
class="on ${classMap({ [on]: true })}">
class="${classMap({ on: true, [on]: true })}">
${allow.map(palette => html`
<label for="radio-${palette}" class="visually-hidden">${palette}</label>
<rh-tooltip>
<span slot="content">${palette}</span>
<input id="radio-${palette}" class="${classMap({ [palette]: true })}"
<input id="radio-${palette}"
class="${classMap({ [palette]: true })}"
name="palette"
type="radio"
value="${palette}"
aria-describedby="host-label"
?checked="${value === palette}">`)}
</rh-tooltip>
?checked="${value === palette}">
</rh-tooltip>`)}
</div>
`;
}
Expand Down

0 comments on commit 31a0852

Please sign in to comment.