Skip to content

Commit

Permalink
Styling wip
Browse files Browse the repository at this point in the history
  • Loading branch information
AudunSorheim committed Nov 14, 2023
1 parent f31a33e commit f773364
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 20 deletions.
20 changes: 11 additions & 9 deletions src/components/page/Page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,17 @@ interface Props {

export const Page = ({ headerText, image, children }: Props) => {
return (
<div className="mb-8">
{image ? (
<PageHeadingWithImage headerText={headerText} image={image} />
) : (
<PageHeading headerText={headerText} />
)}
<>
<div className="mb-4 px-8">
{image ? (
<PageHeadingWithImage headerText={headerText} image={image} />
) : (
<PageHeading headerText={headerText} />
)}
</div>

<div className="flex flex-col items-center p-8">
<div className="flex flex-col max-w-3xl gap-8">
<div className="flex flex-col items-center md:bg-ds-gray-50">
<div className="flex flex-col max-w-3xl gap-8 p-8 md:mt-8 mb-8 bg-white">
{children}
<Link
className="flex self-center"
Expand All @@ -30,6 +32,6 @@ export const Page = ({ headerText, image, children }: Props) => {
</Link>
</div>
</div>
</div>
</>
);
};
2 changes: 1 addition & 1 deletion src/components/page/PageHeading.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ interface Props {

export const PageHeading = ({ headerText }: Props) => {
return (
<div className="flex flex-row bg-header-color p-8 items-center justify-center">
<div className="flex flex-row bg-white pt-4 items-center justify-center">
<Heading size="xlarge" level="1">
{headerText}
</Heading>
Expand Down
4 changes: 2 additions & 2 deletions src/components/page/PageHeadingWithImage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ interface Props {
headerText: ReactNode;
image: MedUtenAGVisning;
}

// lex flex-row bg-white p-4 items-center justify-center
export const PageHeadingWithImage = ({ headerText, image }: Props) => {
return (
<div className="flex flex-row bg-header-color p-8 items-center justify-center gap-8 md:pr-48">
<div className="flex flex-row bg-white pt-4 items-center justify-center gap-8 md:pr-40">
{image && (
<div className="border-solid border-2 border-white p-2 w-32 hidden md:flex">
<Image
Expand Down
12 changes: 4 additions & 8 deletions src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,10 @@ const Home: NextPage = () => {
throw error;
}

return (
<div className="flex flex-col items-center justify-between md:p-8">
{isPending ? (
<AktivitetskravSkeletonComponent />
) : (
<Aktivitetskrav aktivitetskrav={data} />
)}
</div>
return isPending ? (
<AktivitetskravSkeletonComponent />
) : (
<Aktivitetskrav aktivitetskrav={data} />
);
};

Expand Down

0 comments on commit f773364

Please sign in to comment.