Skip to content
This repository was archived by the owner on Mar 7, 2025. It is now read-only.

Commit

Permalink
feat(disabled): support disabled state
Browse files Browse the repository at this point in the history
  • Loading branch information
jason-capsule42 committed Nov 17, 2021
1 parent afe81d8 commit 8fce737
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 10 deletions.
8 changes: 4 additions & 4 deletions demo/demo.md
Original file line number Diff line number Diff line change
Expand Up @@ -604,9 +604,9 @@ The dropdown container will grow in height to the size of the content. A combina

<div class="exampleWrapper">
<auro-dropdown id="hideExample">
<span>
<p>
Lorem ipsum solar
</span>
</p>
<auro-button onclick="document.querySelector('#hideExample').hide()">
Dismiss Dropdown
</auro-button>
Expand All @@ -624,9 +624,9 @@ The dropdown container will grow in height to the size of the content. A combina

```html
<auro-dropdown id="hideExample">
<span>
<p>
Lorem ipsum solar
</span>
</p>
<auro-button onclick="document.querySelector('#hideExample').hide()">
Dismiss Dropdown
</auro-button>
Expand Down
2 changes: 1 addition & 1 deletion src/auro-dropdown.js
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ class AuroDropdown extends LitElement {
</div>
${this.chevron ? html`
<div id="showStateIcon">
<auro-icon category="interface" name="chevron-up"></auro-icon>
<auro-icon category="interface" name="chevron-up" customColor style="color: inherit;"></auro-icon>
</div>
` : undefined}
</div>
Expand Down
24 changes: 19 additions & 5 deletions src/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,15 +14,27 @@
}

:host([bordered]) {
#trigger {
border-color: var(--auro-color-border-primary-on-dark);

&:hover {
background-color: var(--auro-color-background-lighter);
}
}
}

:host([disabled]) {
pointer-events: none;

#trigger,
.popover {
border-color: gray;
#showStateIcon {
color: var(--auro-color-text-disabled-on-light);
}
}

:host([bordered][disabled]) {
#trigger {
&:hover {
border-color: blue;
}
border-color: var(--auro-color-border-disabled-on-light);
}
}

Expand Down Expand Up @@ -60,6 +72,7 @@
display: flex;
align-items: center;
position: relative;
color: var(--auro-color-text-primary-on-light);

&:hover {
cursor: pointer;
Expand All @@ -81,6 +94,7 @@
position: absolute;
top: 0;
right: 0;
color: var(--auro-color-icon-primary-on-light);

auro-icon {
transition: transform 200ms ease-in;
Expand Down

0 comments on commit 8fce737

Please sign in to comment.