Skip to content

Commit

Permalink
perf(examples): refactor JS examples
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-capsule42 committed Feb 22, 2024
1 parent 3806d77 commit 90c273a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion demo/api.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
<script src="https://cdn.jsdelivr.net/npm/@aurodesignsystem/auro-button@latest/dist/auro-button__bundled.js" type="module"></script>
<script src="./api.min.js"></script>
<script>
initToastApiExamples();
initExamples();
</script>
</body>
</html>
4 changes: 2 additions & 2 deletions demo/api.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { showToast } from '../apiExamples/showToast';

export function initToastApiExamples(initCount) {
export function initExamples(initCount) {
initCount = initCount || 0;

try {
Expand All @@ -10,7 +10,7 @@ export function initToastApiExamples(initCount) {
if (initCount <= 20) {
// setTimeout handles issue where content is sometimes loaded after the functions get called
setTimeout(() => {
initToastApiExamples(initCount + 1);
initExamples(initCount + 1);
}, 100);
}
}
Expand Down
4 changes: 2 additions & 2 deletions demo/index.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { showToast } from '../apiExamples/showToast';

export function initToastIndexExamples(initCount) {
export function initExamples(initCount) {
initCount = initCount || 0;

try {
Expand All @@ -10,7 +10,7 @@ export function initToastIndexExamples(initCount) {
if (initCount <= 20) {
// setTimeout handles issue where content is sometimes loaded after the functions get called
setTimeout(() => {
initToastIndexExamples(initCount + 1);
initExamples(initCount + 1);
}, 100);
}
}
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 90c273a

Please sign in to comment.