change layout props to use contentLayout instead of contentClass
This commit is contained in:
parent
f354c6c014
commit
c3837ef6c8
4 changed files with 5 additions and 6 deletions
|
|
@ -6,10 +6,11 @@ import Header from "../components/Header.astro";
|
|||
interface Props {
|
||||
title: string;
|
||||
description: string;
|
||||
contentClass?: string;
|
||||
contentLayout?: "default" | "fill-height";
|
||||
}
|
||||
|
||||
const { title, description, contentClass = "" } = Astro.props;
|
||||
const { title, description, contentLayout = "default" } = Astro.props;
|
||||
const contentClass = contentLayout === "fill-height" ? "flex-1" : "py-12";
|
||||
---
|
||||
|
||||
<!doctype html>
|
||||
|
|
@ -24,7 +25,7 @@ const { title, description, contentClass = "" } = Astro.props;
|
|||
</head>
|
||||
<body class="h-screen max-w-5xl mx-auto flex flex-col font-sans">
|
||||
<Header />
|
||||
<div class={`w-full max-w-3xl mx-auto ${contentClass ?? ""}`}>
|
||||
<div class={`w-full max-w-3xl mx-auto ${contentClass}`}>
|
||||
<slot />
|
||||
</div>
|
||||
<Footer />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue