-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
perf: refactor custom component registration config
- Loading branch information
1 parent
1d34523
commit 891f44a
Showing
4 changed files
with
14 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,4 @@ | ||
import { AuroBadge } from './src/auro-badge.js'; | ||
import * as RuntimeUtils from '@aurodesignsystem/auro-library/scripts/utils/runtimeUtils.mjs'; | ||
|
||
/** | ||
* Register Custom Element. | ||
* @param {Object} name - Name to use for custom element. | ||
* @returns {void} | ||
*/ | ||
export function registerComponent(name) { | ||
// alias definition | ||
if (!customElements.get(name)) { | ||
customElements.define(name, class extends AuroBadge {}); | ||
} | ||
} | ||
|
||
// Example custom registration | ||
// registerComponent('my-badge'); | ||
RuntimeUtils.default.prototype.registerComponent('custom-badge', AuroBadge); |