({
length,
color,
children,
...rest
}: React.DetailedHTMLProps<
React.HTMLAttributes<HTMLHeadingElement>,
HTMLHeadingElement
> & {
length: number;
color?: string;
children?: ReactNode;
})
| 2 | import styles from "./Title.module.css"; |
| 3 | |
| 4 | export 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 | } |
nothing calls this directly
no outgoing calls
no test coverage detected