-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ui): Standardise pages - Onboarding page layout (#253)
* wip: Responsive page layout setup * fix: tests * fix: media queries * fix: slides height & button color * fix: data-testid * fix: disable test
- Loading branch information
1 parent
e00d8fb
commit ca5bdb1
Showing
14 changed files
with
2,057 additions
and
104 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/ui/components/layout/ResponsivePageLayout/ResponsivePageLayout.scss
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
.responsive-page-layout { | ||
display: flex; | ||
flex-direction: column; | ||
padding-inline: 1.25rem; | ||
background: var(--ion-color-light); | ||
|
||
.responsive-page-content { | ||
display: flex; | ||
flex-direction: column; | ||
justify-content: space-evenly; | ||
height: 100%; | ||
|
||
> * { | ||
flex: 0 1 auto; | ||
margin: 0; | ||
} | ||
} | ||
} |
19 changes: 19 additions & 0 deletions
19
src/ui/components/layout/ResponsivePageLayout/ResponsivePageLayout.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import { IonPage } from "@ionic/react"; | ||
import { ResponsivePageLayoutProps } from "./ResponsivePageLayout.types"; | ||
import "./ResponsivePageLayout.scss"; | ||
|
||
const ResponsivePageLayout = ({ | ||
title, | ||
children, | ||
}: ResponsivePageLayoutProps) => { | ||
return ( | ||
<IonPage | ||
className={`responsive-page-layout safe-area ${title}`} | ||
data-testid={title} | ||
> | ||
<div className="responsive-page-content">{children}</div> | ||
</IonPage> | ||
); | ||
}; | ||
|
||
export { ResponsivePageLayout }; |
8 changes: 8 additions & 0 deletions
8
src/ui/components/layout/ResponsivePageLayout/ResponsivePageLayout.types.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { ReactNode } from "react"; | ||
|
||
interface ResponsivePageLayoutProps { | ||
title?: string; | ||
children?: ReactNode; | ||
} | ||
|
||
export type { ResponsivePageLayoutProps }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export * from "./ResponsivePageLayout"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,3 @@ | ||
@import "swiper/css"; | ||
@import "swiper/css/autoplay"; | ||
@import "@ionic/react/css/ionic-swiper.css"; | ||
|
||
.onboarding { | ||
.swiper { | ||
padding-top: 2.5rem; | ||
} | ||
|
||
.get-started-button { | ||
margin: 30px 0; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.