MCPcopy Create free account
hub / github.com/TejasQ/tejaskumar.com / Title

Function Title

components/Title.tsx:4–30  ·  view source on GitHub ↗
({
  length,
  color,
  children,
  ...rest
}: React.DetailedHTMLProps<
  React.HTMLAttributes<HTMLHeadingElement>,
  HTMLHeadingElement
> & {
  length: number;
  color?: string;
  children?: ReactNode;
})

Source from the content-addressed store, hash-verified

2import styles from "./Title.module.css";
3
4export default function Title({
5 length,
6 color,
7 children,
8 ...rest
9}: React.DetailedHTMLProps<
10 React.HTMLAttributes<HTMLHeadingElement>,
11 HTMLHeadingElement
12> & {
13 length: number;
14 color?: string;
15 children?: ReactNode;
16}) {
17 return (
18 <h1
19 {...rest}
20 className={styles.title}
21 style={{
22 fontSize: `${length > 9 ? 12 : 17}vw`,
23 color: color || "inherit",
24 ...rest.style,
25 }}
26 >
27 {children}
28 </h1>
29 );
30}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected