Skip to content

Commit

Permalink
Merge pull request #51 from adjust/fixes
Browse files Browse the repository at this point in the history
Bug fixes
  • Loading branch information
YaraMatkova authored Dec 12, 2023
2 parents 7840b4a + cc759c9 commit 91ba52d
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 4 deletions.
12 changes: 12 additions & 0 deletions layout/assets/reset-styles.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
@import 'assets/fonts.scss';

@mixin reset-styles($backgroundColor: transparent) {
min-width: auto;
min-height: auto;
padding: 0;
margin: 0;
background-color: $backgroundColor;
font-family: $fontsFamily;
font-size: 16px;
line-height: normal;
}
4 changes: 4 additions & 0 deletions layout/src/action-button/styles.module.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
@import 'assets/colors.scss';
@import 'assets/fonts.scss';

@import 'assets/reset-styles.scss';

.action {
@include reset-styles;

color: $ctaColor;
background: $ctaBackgroundColor;
border: 1px solid rgba(205, 208, 224, 0.3);
Expand Down
3 changes: 3 additions & 0 deletions layout/src/app-icon/styles.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@

@import 'assets/colors.scss';
@import 'assets/fonts.scss';
@import 'assets/reset-styles.scss';

.app-icon {
@include reset-styles;

min-width: 56px;
width: 56px;
height: 56px;
Expand Down
7 changes: 7 additions & 0 deletions layout/src/banner-body/styles.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@

@import 'assets/colors.scss';
@import 'assets/fonts.scss';
@import 'assets/reset-styles.scss';

.banner-body {
@include reset-styles;

display: flex;
box-sizing: border-box;
height: 100%;
Expand Down Expand Up @@ -40,6 +43,8 @@
}

.container {
@include reset-styles;

display: flex;
flex: 1;
height: 100%;
Expand Down Expand Up @@ -69,6 +74,8 @@
}

.text-container {
@include reset-styles;

flex: 0 1 auto;
min-height: 0;
min-width: 0;
Expand Down
3 changes: 3 additions & 0 deletions layout/src/dismiss-button/styles.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
@use 'assets/size-large.scss' as large;

@import 'assets/colors.scss';
@import 'assets/reset-styles.scss';

.dismiss {
@include reset-styles;

flex-shrink: 0;
padding: 0;
border: none;
Expand Down
8 changes: 4 additions & 4 deletions layout/src/smart-banner-view.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ export class SmartBannerView implements SmartBannerLayout {
}

private attachBannerToParent(parent: HTMLElement) {
const attach = (child: HTMLElement, parent: HTMLElement, position?: Position) => {
const attach = (child: HTMLElement, parent: HTMLElement, position: Position) => {
if (position === Position.Top) {
parent.insertBefore(child, parent.firstChild);
} else {
Expand All @@ -55,10 +55,10 @@ export class SmartBannerView implements SmartBannerLayout {
}

if (this.wrapper) {
attach(this.root, this.wrapper);
attach(this.wrapper, parent);
attach(this.root, this.wrapper, this.data.position);
attach(this.wrapper, parent, this.data.position);
} else {
attach(this.root, parent);
attach(this.root, parent, this.data.position);
}
}

Expand Down
4 changes: 4 additions & 0 deletions layout/src/styles.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
@use 'assets/size-medium.scss' as medium;
@use 'assets/size-large.scss' as large;

@import 'assets/reset-styles.scss';

.banner-placeholder {
height: small.$bannerHeight;
}
Expand All @@ -12,6 +14,8 @@
}

.banner {
@include reset-styles;

pointer-events: none;
position: fixed;
left: 0;
Expand Down
3 changes: 3 additions & 0 deletions layout/src/text/styles.module.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@

@import 'assets/colors.scss';
@import 'assets/fonts.scss';
@import 'assets/reset-styles.scss';

.banner-text {
@include reset-styles;

overflow: hidden;
}

Expand Down

0 comments on commit 91ba52d

Please sign in to comment.