1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-06-30 22:26:38 -04:00

update component prop types to use JSX.IntrinsicElements

This commit is contained in:
2022-02-09 09:37:20 -05:00
parent f205a14bdc
commit 885f97fa64
40 changed files with 280 additions and 275 deletions

View File

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