mirror of
https://github.com/jakejarvis/jarv.is.git
synced 2025-06-30 22:06:38 -04:00
remove unnecessary PropsWithChildren
This commit is contained in:
@ -3,15 +3,13 @@ import { useTheme } from "next-themes";
|
||||
import classNames from "classnames";
|
||||
import { Giscus } from "@giscus/react";
|
||||
import { giscusConfig } from "../../lib/config";
|
||||
import type { PropsWithChildren } from "react";
|
||||
import type { GiscusProps } from "@giscus/react";
|
||||
|
||||
import styles from "./Comments.module.css";
|
||||
|
||||
type CommentsProps = JSX.IntrinsicElements["div"] &
|
||||
PropsWithChildren<{
|
||||
title: string;
|
||||
}>;
|
||||
type CommentsProps = JSX.IntrinsicElements["div"] & {
|
||||
title: string;
|
||||
};
|
||||
|
||||
const Comments = ({ title, className, ...rest }: CommentsProps) => {
|
||||
const { resolvedTheme } = useTheme();
|
||||
|
@ -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();
|
||||
|
@ -1,16 +1,14 @@
|
||||
import NextLink from "next/link";
|
||||
import classNames from "classnames";
|
||||
import isAbsoluteUrl from "is-absolute-url";
|
||||
import type { PropsWithChildren } from "react";
|
||||
import type { LinkProps as NextLinkProps } from "next/link";
|
||||
|
||||
import styles from "./Link.module.css";
|
||||
|
||||
export type CustomLinkProps = Omit<JSX.IntrinsicElements["a"], "href"> &
|
||||
NextLinkProps &
|
||||
PropsWithChildren<{
|
||||
NextLinkProps & {
|
||||
forceNewWindow?: boolean;
|
||||
}>;
|
||||
};
|
||||
|
||||
const CustomLink = ({
|
||||
href,
|
||||
|
@ -1,15 +1,13 @@
|
||||
import { useEffect, useRef } from "react";
|
||||
import classNames from "classnames/bind";
|
||||
import type { PropsWithChildren } from "react";
|
||||
|
||||
import styles from "./Wallpaper.module.css";
|
||||
const cx = classNames.bind(styles);
|
||||
|
||||
type WallpaperProps = JSX.IntrinsicElements["div"] &
|
||||
PropsWithChildren<{
|
||||
image: string;
|
||||
tile?: boolean;
|
||||
}>;
|
||||
type WallpaperProps = JSX.IntrinsicElements["div"] & {
|
||||
image: string;
|
||||
tile?: boolean;
|
||||
};
|
||||
|
||||
const Wallpaper = ({ image, tile, className, ...rest }: WallpaperProps) => {
|
||||
const bgRef = useRef<HTMLDivElement>(null);
|
||||
|
Reference in New Issue
Block a user