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 Sep 30, 2024
1 parent 7c65c30 commit 9ee3022
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/auro-toast.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ import successIcon from '@alaskaairux/icons/dist/icons/interface/check-stroke.mj
import errorIcon from '@alaskaairux/icons/dist/icons/alert/error-stroke.mjs';
import infoIcon from '@alaskaairux/icons/dist/icons/alert/information-stroke.mjs';

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

import { AuroDependencyVersioning } from '@aurodesignsystem/auro-library/scripts/runtime/dependencyTagVersioning.mjs';

import { AuroButton } from '@aurodesignsystem/auro-button/src/auro-button.js';
Expand Down Expand Up @@ -65,6 +67,7 @@ export class AuroToast extends LitElement {
* @private
*/
this.successSvg = this.successDom.body.firstChild;

this.successSvg.setAttribute('slot', 'svg');

/**
Expand Down Expand Up @@ -101,6 +104,11 @@ export class AuroToast extends LitElement {
*/
this.iconTag = versioning.generateTag('auro-icon', iconVersion, AuroIcon);

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

/**
* @private
*/
Expand Down Expand Up @@ -135,6 +143,11 @@ export class AuroToast extends LitElement {
];
}

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

/**
* @private
* @returns {void}
Expand Down

0 comments on commit 9ee3022

Please sign in to comment.