Skip to content

Commit

Permalink
feat: add tag name as attribute when custom registered
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanjones243 committed Oct 2, 2024
1 parent 35368c7 commit 4b3c3ec
Showing 1 changed file with 22 additions and 3 deletions.
25 changes: 22 additions & 3 deletions src/auro-flightline.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import { LitElement, html } from "lit";
import { classMap } from "lit/directives/class-map.js";

import AuroLibraryRuntimeUtils from '@aurodesignsystem/auro-library/scripts/utils/runtimeUtils.mjs';

import styleCss from "./style-flightline-css.js";
import colorCss from "./color-flightline-css.js";
import tokensCss from "./tokens-css.js";
Expand All @@ -25,14 +27,26 @@ export class AuroFlightline extends LitElement {
super();
this.canceled = false;

/** @private */
/**
* @private
*/
this.hasCanceledSegment = false;

/** @private */
/**
* @private
*/
this.firstSegmentCanceled = false;

/** @private */
/**
* @private
*/
this.lastSegmentCanceled = false;


/**
* @private
*/
this.runtimeUtils = new AuroLibraryRuntimeUtils();
}

static get properties() {
Expand All @@ -52,6 +66,11 @@ export class AuroFlightline extends LitElement {
];
}

firstUpdated() {
// Add the tag name as an attribute if it is different than the component name
this.runtimeUtils.handleComponentTagRename(this, 'auro-flightline');
}

/** @private */
containsCanceledSegment() {
const segments = this.querySelectorAll('auro-flight-segment');
Expand Down

0 comments on commit 4b3c3ec

Please sign in to comment.