Skip to content

Commit

Permalink
fix: added arrow bg color for Popover component (#2477)
Browse files Browse the repository at this point in the history
  • Loading branch information
PKulkoRaccoonGang authored Aug 1, 2023
1 parent 5c5e5c7 commit fe8f1ae
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 27 deletions.
31 changes: 31 additions & 0 deletions src/Popover/_mixins.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
@mixin get-popover-variant($bg, $icon-color) {
background: $bg;

.popover-header {
background: $bg;

&::before {
border-bottom-color: $bg;
}
}

.pgn__icon {
color: $icon-color;
}

&.bs-popover-bottom .arrow::after {
border-bottom-color: $bg;
}

&.bs-popover-top .arrow::after {
border-top-color: $bg;
}

&.bs-popover-right .arrow::after {
border-right-color: $bg;
}

&.bs-popover-left .arrow::after {
border-left-color: $bg;
}
}
31 changes: 4 additions & 27 deletions src/Popover/index.scss
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
@import "variables";
@import "mixins";
@import "~bootstrap/scss/popover";

.popover {
Expand All @@ -18,37 +19,13 @@
}

.popover-success {
background: $popover-success-bg;

.popover-header {
background: $popover-success-bg;
}

.pgn__icon {
color: $popover-success-icon-color;
}
@include get-popover-variant($popover-success-bg, $popover-success-icon-color);
}

.popover-warning {
background: $popover-warning-bg;

.popover-header {
background: $popover-warning-bg;
}

.pgn__icon {
color: $popover-warning-icon-color;
}
@include get-popover-variant($popover-warning-bg, $popover-warning-icon-color);
}

.popover-danger {
background: $popover-danger-bg;

.popover-header {
background: $popover-danger-bg;
}

.pgn__icon {
color: $popover-danger-icon-color;
}
@include get-popover-variant($popover-danger-bg, $popover-danger-icon-color);
}

0 comments on commit fe8f1ae

Please sign in to comment.