1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-06-30 21:46:39 -04:00

remove unnecessary PropsWithChildren

This commit is contained in:
2022-02-09 11:05:48 -05:00
parent 3801989a5b
commit 8385e011c5
7 changed files with 79 additions and 86 deletions

View File

@ -5,14 +5,12 @@ import classNames from "classnames";
import Header from "../Header/Header";
import Footer from "../Footer/Footer";
import themes, { toCSS } from "../../lib/themes";
import type { PropsWithChildren } from "react";
import styles from "./Layout.module.css";
type LayoutProps = JSX.IntrinsicElements["div"] &
PropsWithChildren<{
noContainer?: boolean; // pass true to disable default `<main>` container styles with padding, etc.
}>;
type LayoutProps = JSX.IntrinsicElements["div"] & {
noContainer?: boolean; // pass true to disable default `<main>` container styles with padding, etc.
};
const Layout = ({ noContainer, className, children, ...rest }: LayoutProps) => {
const { resolvedTheme } = useTheme();