Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Page Title Layout Component #479

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
.main {
background-color: $primary-black;
height: 100%;
display: flex;
flex-direction: column;

@media screen and (min-width: $breakpoint-tablet) {
box-sizing: border-box;
padding: 24px;
}

.title {
@include heading-2;
color: white;
text-transform: uppercase;
font-weight: 400;
margin: 64px auto 24px 24px;

@media screen and (min-width: $breakpoint-tablet) {
margin: 80px auto 40px;
}
}

.content {
width: 100%;
height: 100%;
background-color: $primary-background;
background-color: white;
border-radius: 16px 16px 0px 0px;
box-shadow: 0px -4px 20px 0px rgba(23, 22, 21, 0.3);

@media screen and (min-width: $breakpoint-tablet) {
border-radius: 24px;
}
}
}
21 changes: 21 additions & 0 deletions apps/app/src/components/PageTitleLayout/PageTitleLayout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import React from 'react';
import c from './PageTitleLayout.module.scss';

type PageTitleLayoutType = {
title: string;
children?: React.ReactNode;
};

const PageTitleLayout: React.FC<PageTitleLayoutType> = ({
title,
children,
}) => {
return (
<main className={c.main}>
<h1 className={c.title}>{title}</h1>
<div className={c.content}>{children}</div>
</main>
);
};

export default PageTitleLayout;
3 changes: 3 additions & 0 deletions apps/app/src/components/PageTitleLayout/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
import PageTitleLayout from './PageTitleLayout';

export default PageTitleLayout;
8 changes: 3 additions & 5 deletions apps/app/src/pages/FlyTalksPage/FlyTalksPage.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
import PageTitleLayout from '../../components/PageTitleLayout';

export const FlyTalksPage = () => {
return (
<div>
<h1>Fly Talks</h1>
</div>
);
return <PageTitleLayout title='Fly Talks'></PageTitleLayout>;
};
Loading