1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-07-21 01:21:16 -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

@@ -1,13 +1,13 @@
import { forwardRef } from "react";
import classNames from "classnames";
import type { Ref, HTMLAttributes } from "react";
import type { Ref } from "react";
import styles from "./Terminal.module.css";
type Props = HTMLAttributes<HTMLDivElement>;
type TerminalProps = JSX.IntrinsicElements["div"];
// a DOS-style terminal box with dynamic text
const Terminal = forwardRef(function Terminal({ className, ...rest }: Props, ref: Ref<HTMLSpanElement>) {
const Terminal = forwardRef(function Terminal({ className, ...rest }: TerminalProps, ref: Ref<HTMLSpanElement>) {
return (
<div className={classNames("monospace", className, styles.terminal)} {...rest}>
<span ref={ref} /> <span className={styles.blink} />