1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-09-17 17:35:31 -04:00

fix unnoticeable background color bug in dark mode

This commit is contained in:
2022-02-05 14:50:29 -05:00
parent ca7d21b3d2
commit 42a7ff1bdc
26 changed files with 118 additions and 81 deletions

View File

@@ -3,20 +3,21 @@ import { useTheme } from "next-themes";
import classNames from "classnames";
import { Giscus } from "@giscus/react";
import { giscusConfig } from "../../lib/config";
import type { PropsWithChildren, HTMLAttributes } from "react";
import type { GiscusProps } from "@giscus/react";
import styles from "./Comments.module.css";
type Props = {
title: string;
className?: string;
};
type Props = HTMLAttributes<HTMLDivElement> &
PropsWithChildren<{
title: string;
}>;
const Comments = ({ title, className }: Props) => {
const Comments = ({ title, className, ...rest }: Props) => {
const { resolvedTheme } = useTheme();
return (
<div className={classNames(styles.wrapper, className)}>
<div className={classNames(styles.wrapper, className)} {...rest}>
<Giscus
{...(giscusConfig as GiscusProps)}
term={title}