Skip to content

Commit

Permalink
fix: Style responsiveness and segment bug (#264)
Browse files Browse the repository at this point in the history
  • Loading branch information
sdisalvo-crd authored Nov 23, 2023
1 parent d9cf5f2 commit f66aeb1
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 46 deletions.
6 changes: 3 additions & 3 deletions src/ui/components/Alert/Alert.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
.alert-wrapper {
max-width: 90% !important;
padding: 25px 20px !important;
padding: 1.56rem 1.25rem;
border-radius: 1rem !important;

.alert-title.sc-ion-alert-md {
Expand All @@ -19,7 +19,7 @@
line-height: normal;
}

@media screen and (min-height: 300px) and (max-height: 580px) {
@media screen and (min-width: 250px) and (max-width: 370px) {
h2 {
font-size: 0.9rem;
line-height: 1.2rem;
Expand Down Expand Up @@ -68,7 +68,7 @@ button.alert-button {
}
}

@media screen and (min-height: 300px) and (max-height: 580px) {
@media screen and (min-width: 250px) and (max-width: 370px) {
button.alert-button {
&.sc-ion-alert-ios,
&.sc-ion-alert-md {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@
}
}

@media screen and (min-height: 300px) and (max-height: 550px) {
@media screen and (min-width: 250px) and (max-width: 425px) {
ion-label {
font-size: 0.8rem;
height: 1rem;
line-height: normal;
margin: 0 auto;
}

ion-segment-button {
ion-segment-button.md {
height: 2.4rem;
min-height: 2.4rem;
}
Expand Down
2 changes: 1 addition & 1 deletion src/ui/components/PageHeader/PageHeader.scss
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
text-align: center;
}

@media screen and (min-height: 300px) and (max-height: 600px) {
@media screen and (min-width: 250px) and (max-width: 370px) {
ion-toolbar {
.back-button,
.close-button,
Expand Down
40 changes: 18 additions & 22 deletions src/ui/components/SeedPhraseModule/SeedPhraseModule.scss
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
.seed-phrase-module {
margin: 0;
position: relative;
border: 1px solid var(--ion-color-dark-grey);
border-radius: 1rem;
--background: var(--ion-color-light-grey);
box-shadow: none;

.overlay {
border-radius: 1rem;
padding-inline: 1rem;

&.visible {
display: flex;
flex-direction: column;
justify-content: center;
justify-content: space-evenly;
position: absolute;
top: 0;
z-index: 2;
Expand All @@ -23,31 +25,30 @@
display: none;
}

ion-card-header {
margin: 0 auto;
padding: 0 0 0.7rem;

ion-icon {
height: 1.4rem;
width: 1.4rem;
}
p,
ion-icon {
color: var(--ion-color-light);
margin: 0;
}

ion-card-content {
padding-inline: 1rem;
ion-icon {
height: 1.4rem;
width: 1.4rem;
align-self: center;
}

ion-button {
font-size: 1rem;
height: 3.25rem;
margin: 0 auto;
color: var(--ion-color-light);
--border-color: var(--ion-color-light);
margin: 0 auto;
}

@media screen and (min-height: 300px) and (max-height: 600px) {
@media screen and (min-width: 250px) and (max-width: 425px) {
ion-button {
font-size: 0.8rem;
height: 2.5rem;
margin: 0 auto;
}
}
}
Expand All @@ -63,6 +64,7 @@
width: 92%;
margin: 0.3rem auto;
padding-inline: 0.475rem;
font-size: 1rem;

.index {
margin-right: 0.25rem;
Expand All @@ -77,7 +79,7 @@
filter: blur(5px);
}

@media screen and (min-height: 300px) and (max-height: 600px) {
@media screen and (min-width: 250px) and (max-width: 425px) {
padding: 0.25rem;

ion-chip {
Expand All @@ -94,10 +96,4 @@
}
}
}

p,
ion-icon {
color: var(--ion-color-light);
margin: 0;
}
}
23 changes: 7 additions & 16 deletions src/ui/components/SeedPhraseModule/SeedPhraseModule.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
import {
IonButton,
IonCard,
IonCardContent,
IonCardHeader,
IonChip,
IonIcon,
} from "@ionic/react";
import { IonButton, IonChip, IonIcon } from "@ionic/react";
import { eyeOffOutline } from "ionicons/icons";
import { i18n } from "../../../i18n";
import "./SeedPhraseModule.scss";
Expand All @@ -17,17 +10,15 @@ const SeedPhraseModule = ({
setShowSeedPhrase,
}: SeedPhraseModuleProps) => {
return (
<IonCard className="seed-phrase-module">
<div className="seed-phrase-module">
<div
data-testid="seed-phrase-privacy-overlay"
className={`overlay ${showSeedPhrase ? "hidden" : "visible"}`}
>
<IonCardHeader>
<IonIcon icon={eyeOffOutline} />
</IonCardHeader>
<IonCardContent data-testid="seed-phrase-privacy-overlay-text">
<p>{i18n.t("generateseedphrase.privacy.overlay.text")}</p>
</IonCardContent>
<IonIcon icon={eyeOffOutline} />
<p data-testid="seed-phrase-privacy-overlay-text">
{i18n.t("generateseedphrase.privacy.overlay.text")}
</p>
<IonButton
shape="round"
fill="outline"
Expand All @@ -53,7 +44,7 @@ const SeedPhraseModule = ({
);
})}
</div>
</IonCard>
</div>
);
};

Expand Down
1 change: 1 addition & 0 deletions src/ui/pages/GenerateSeedPhrase/GenerateSeedPhrase.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,7 @@ const GenerateSeedPhrase = () => {
} else {
setSeedPhrase(seedPhrase256);
}
setShowSeedPhrase(false);
};

const HandleTerms = () => {
Expand Down
4 changes: 2 additions & 2 deletions src/ui/styles/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ p {
color: var(--ion-color-secondary);
}

@media screen and (min-height: 300px) and (max-height: 660px) {
@media screen and (min-width: 250px) and (max-width: 370px) {
h2,
h3 {
margin-bottom: 0;
Expand Down Expand Up @@ -125,7 +125,7 @@ p {
}
}

@media screen and (min-height: 300px) and (max-height: 600px) {
@media screen and (min-width: 250px) and (max-width: 370px) {
.primary-button,
.secondary-button,
.tertiary-button {
Expand Down

0 comments on commit f66aeb1

Please sign in to comment.