Skip to content

Commit

Permalink
refactor: Addressed PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
rkaraivanov committed Jul 6, 2022
1 parent 90c49d1 commit b40785d
Show file tree
Hide file tree
Showing 3 changed files with 165 additions and 147 deletions.
4 changes: 3 additions & 1 deletion src/components/tabs/tab-panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ import { html, LitElement } from 'lit';
import { property } from 'lit/decorators.js';
import { styles } from './themes/light/tab-panel.base.css.js';

let next = 0;

/**
* Represents the content of a tab
*
Expand All @@ -16,7 +18,7 @@ export default class IgcTabPanelComponent extends LitElement {

/** The tab panel's id. */
@property({ type: String })
public override id = '';
public override id = `tab-panel-${++next}`;

public override connectedCallback() {
this.setAttribute('role', 'tabpanel');
Expand Down
Loading

0 comments on commit b40785d

Please sign in to comment.