-
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(template): update template to use auro-button
- Loading branch information
1 parent
383321b
commit b9d6650
Showing
11 changed files
with
350 additions
and
118 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,4 +25,3 @@ function initAccordionApiExamples(initCount) { | |
} | ||
} | ||
|
||
export { initAccordionApiExamples }; |
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 |
---|---|---|
|
@@ -3,4 +3,3 @@ | |
function initAccordionIndexExamples(initCount) { | ||
} | ||
|
||
export { initAccordionIndexExamples }; |
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,22 +1,20 @@ | ||
import { AuroAccordion } from './src/auro-accordion'; | ||
import { AuroAccordionGroup } from './src/auro-accordion-group'; | ||
import { AuroAccordionGroup } from './src/auro-accordion-group'; | ||
import { AuroAccordionButton } from './src/auro-accordionbutton'; | ||
|
||
/** | ||
* Register Custom Element. | ||
* @param {Object} name - Name to use for custom element. | ||
* @param {Function} className - Class name to use for custom element. | ||
* @returns {void} | ||
*/ | ||
const registerComponent = (name = 'custom-accordion') => { | ||
const groupName = name + '-group'; | ||
|
||
export function registerComponent(name, className) { | ||
// alias definition | ||
if (!customElements.get(name)) { | ||
customElements.define(name, class extends AuroAccordion {}); | ||
} | ||
|
||
if (!customElements.get(groupName)) { | ||
customElements.define(groupName, class extends AuroAccordionGroup {}); | ||
customElements.define(name, class extends className {}); | ||
} | ||
} | ||
|
||
export { registerComponent } | ||
registerComponent('auro-accordion', AuroAccordion); | ||
registerComponent('auro-accordion-group', AuroAccordionGroup); | ||
registerComponent('auro-accordionbutton', AuroAccordionButton); |
Oops, something went wrong.