Skip to content

Commit

Permalink
docs(rounded): add examples for rounded button #212
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanjones243 committed Jun 15, 2023
1 parent 04780b1 commit 8669f8a
Show file tree
Hide file tree
Showing 7 changed files with 40 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apiExamples/rounded.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<auro-button aria-label="arrow-up" rounded iconOnly>
<auro-icon customSize customcolor category="interface" name="arrow-up" slot="icon"></auro-icon>
</auro-button>
4 changes: 4 additions & 0 deletions apiExamples/roundedRightAlign.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<auro-button aria-label="in-flight" rounded iconOnly toggleText id="rightAlignElem" style="float: right;">
Back to Top
<auro-icon customSize customcolor category="interface" name="arrow-up" slot="icon"></auro-icon>
</auro-button>
11 changes: 11 additions & 0 deletions apiExamples/roundedRightAlign.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export function roundedRightAlignExample() {
const rightAlignElem = document.querySelector('#rightAlignElem');

rightAlignElem.addEventListener('mouseover', () => {
rightAlignElem.iconOnly = false;
});

rightAlignElem.addEventListener('mouseout', () => {
rightAlignElem.iconOnly = true;
});
}
3 changes: 3 additions & 0 deletions apiExamples/roundedTextOnly.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<auro-button aria-label="arrow-up" rounded>
Primary
</auro-button>
4 changes: 4 additions & 0 deletions apiExamples/roundedTextWithIcon.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<auro-button aria-label="in-flight" rounded>
Back to Top
<auro-icon customSize customcolor category="interface" name="arrow-up" slot="icon"></auro-icon>
</auro-button>
4 changes: 4 additions & 0 deletions apiExamples/toggledText.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<auro-button aria-label="arrow-up" rounded iconOnly toggleText id="toggledTextElem">
Text is now shown!
<auro-icon customSize customcolor category="interface" name="arrow-up" slot="icon"></auro-icon>
</auro-button>
11 changes: 11 additions & 0 deletions apiExamples/toggledText.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
export function toggledTextExample() {
const toggledTextElem = document.querySelector('#toggledTextElem');

toggledTextElem.addEventListener('mouseover', () => {
toggledTextElem.iconOnly = false;
});

toggledTextElem.addEventListener('mouseout', () => {
toggledTextElem.iconOnly = true;
});
}

0 comments on commit 8669f8a

Please sign in to comment.