1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-04-27 15:16:21 -04:00
jarv.is/components/Terminal/Terminal.tsx

19 lines
572 B
TypeScript

import { forwardRef } from "react";
import classNames from "classnames";
import type { Ref } from "react";
import styles from "./Terminal.module.css";
export type TerminalProps = JSX.IntrinsicElements["div"];
// a DOS-style terminal box with dynamic text
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} />
</div>
);
});
export default Terminal;