diff --git a/demo/index.html b/demo/index.html index 3a3e800..acce52a 100644 --- a/demo/index.html +++ b/demo/index.html @@ -42,8 +42,10 @@ diff --git a/demo/index.md b/demo/index.md index 53a29d6..56faeaa 100644 --- a/demo/index.md +++ b/demo/index.md @@ -66,6 +66,12 @@ There are two important parts of every Auro component. The diff --git a/docs/partials/index.md b/docs/partials/index.md index d9f5346..66f7f77 100644 --- a/docs/partials/index.md +++ b/docs/partials/index.md @@ -41,6 +41,12 @@ There are two important parts of every Auro component. The diff --git a/index.js b/index.js index c3485df..323a269 100644 --- a/index.js +++ b/index.js @@ -1,15 +1,4 @@ import { AuroMenu } from './src/auro-menu.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} - */ - const registerComponent = (name = 'custom-menu') => { - // alias definition - if (!customElements.get(name)) { - customElements.define(name, class extends AuroMenu {}); - } -} - -export { registerComponent } +RuntimeUtils.default.prototype.registerComponent('auro-menu', AuroMenu);