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:
@@ -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} />
|
||||
|
Reference in New Issue
Block a user