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 authored and jason-capsule42 committed Oct 4, 2024
1 parent e0555d2 commit 454f660
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/auro-lockup.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import { LitElement, html } from "lit";
import { ifDefined } from 'lit/directives/if-defined.js';
import { classMap } from 'lit/directives/class-map.js';

import logoOfficial from '@alaskaairux/icons/dist/restricted/AS-tagline-200.mjs';
import logoStandard from '@alaskaairux/icons/dist/restricted/AS-200.mjs';
import logoOneworld from '@alaskaairux/icons/dist/logos/oneworld.mjs';
Expand All @@ -17,6 +18,8 @@ import styleCss from "./style-css.js";
import colorCss from "./color-css.js";
import tokensCss from "./tokens-css.js";

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

// See https://git.io/JJ6SJ for "How to document your components using JSDoc"
/**
* The auro-lockup element is a standardized custom element for the use in headers of Alaska Airlines extended experiences.
Expand All @@ -37,6 +40,11 @@ export class AuroLockup extends LitElement {
this.path = '/';
this.standard = false;
this.oneworld = false;

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

// function to define props used within the scope of this component
Expand All @@ -63,6 +71,11 @@ export class AuroLockup extends LitElement {
];
}

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

/**
* @private
* @param {string} svgContent - The imported svg icon.
Expand Down

0 comments on commit 454f660

Please sign in to comment.