Skip to content

Commit

Permalink
Add modal popup style, fix z-index, fix opacity prop
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwardCoyle committed May 19, 2021
1 parent c8fbbd2 commit 4e2000b
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/ids-base/ids-constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const props = {
MULTIPLE: 'multiple',
NO_MARGINS: 'no-margins',
NO_TEXT_ELLIPSIS: 'no-text-ellipsis',
OPACTIY: 'opacity',
OPACITY: 'opacity',
OVERFLOW: 'overflow',
PLACEHOLDER: 'placeholder',
PLACEMENT: 'placement',
Expand Down
2 changes: 1 addition & 1 deletion src/ids-modal/ids-modal-z-counter.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*/
class IdsModalZCounter {
constructor() {
this.zCounter = 1000;
this.zCounter = 1020;
}

increment() {
Expand Down
2 changes: 1 addition & 1 deletion src/ids-modal/ids-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class IdsModal extends mix(IdsElement).with(...appliedMixins) {
connectedCallback() {
super.connectedCallback();

this.popup.type = 'menu';
this.popup.type = 'modal';
this.popup.animated = true;
this.popup.animationStyle = 'scale-in';
this.setAttribute('role', 'dialog');
Expand Down
2 changes: 1 addition & 1 deletion src/ids-popup/ids-popup.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ const ANIMATION_STYLES = [
const ARROW_TYPES = ['none', 'bottom', 'top', 'left', 'right'];

// Types of Popups
const TYPES = ['none', 'menu', 'menu-alt', 'tooltip', 'tooltip-alt'];
const TYPES = ['none', 'menu', 'menu-alt', 'modal', 'tooltip', 'tooltip-alt'];

// Properties exposed with getters/setters
// safeSet/RemoveAttribute also use these so we pull them out
Expand Down
15 changes: 15 additions & 0 deletions src/ids-popup/ids-popup.scss
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,21 @@
@include text-12();
@include text-black();
}

// style: "modal"
&.modal {
@include antialiased();
@include bg-white();
@include border-1();
@include border-solid();
@include font-sans();
@include p-8();
@include rounded-default();
@include shadow();

border-color: var(--ids-color-palette-slate-30);
box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}
}

.content-wrapper {
Expand Down

0 comments on commit 4e2000b

Please sign in to comment.