Skip to content

Commit

Permalink
Merge pull request #30 from GleapSDK/Banner-z-index
Browse files Browse the repository at this point in the history
Update z-index
  • Loading branch information
boehlerlukas authored Oct 5, 2023
2 parents 0f2d6e8 + c687d28 commit b830442
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions src/UI.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,17 @@ export const injectStyledCSS = (
backgroundColor,
buttonX,
buttonY,
buttonStyle,
buttonStyle
) => {
const contrastColor = calculateContrast(primaryColor);
const contrastButtonColor = calculateContrast(buttonColor);
const contrastBackgroundColor = calculateContrast(backgroundColor);
const contrastHeaderColor = calculateContrast(headerColor);
const isDarkMode = contrastBackgroundColor === "#ffffff";
const headerDarkColor = calculateShadeColor(headerColor, contrastHeaderColor === "#ffffff" ? -35 : -15);
const headerDarkColor = calculateShadeColor(
headerColor,
contrastHeaderColor === "#ffffff" ? -35 : -15
);
const subTextColor = isDarkMode
? calculateShadeColor(backgroundColor, 100)
: calculateShadeColor(backgroundColor, -120);
Expand All @@ -68,7 +71,9 @@ export const injectStyledCSS = (
const zIndexBase = 2147483600;

var bottomInfoOffset = 57 + buttonY;
if (buttonStyle === GleapFeedbackButtonManager.FEEDBACK_BUTTON_CLASSIC_BOTTOM) {
if (
buttonStyle === GleapFeedbackButtonManager.FEEDBACK_BUTTON_CLASSIC_BOTTOM
) {
bottomInfoOffset = buttonY + 15;
} else if (buttonStyle && buttonStyle.includes("CLASSIC")) {
bottomInfoOffset = buttonY;
Expand Down Expand Up @@ -125,6 +130,7 @@ export const injectStyledCSS = (
transition: margin 0.3s ease-out;
margin-top: var(--gleap-margin-top);
position: relative;
z-index: 10000;
}
.gleap-b-f {
Expand Down

0 comments on commit b830442

Please sign in to comment.