This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"data": { | |
"viewer": { | |
"id": "clmrvzzlx000008l6e8a4de9o", | |
"name": "Glenn", | |
"posts": [ | |
{ | |
"id": "clmrw16zi000108l619ctafwt", | |
"message": "I'm excited you're here at the awesome GraphQL Workshop!" | |
}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import type { ComponentPropsWithoutRef, ElementType } from 'react'; | |
type H1Props<TElementType extends ElementType> = Omit<ComponentPropsWithoutRef<TElementType>, 'className'> & { | |
as?: Extract<TElementType, 'h1' | 'h2' | 'h3' | 'h4'>; | |
}; | |
export function H1<TElementType extends ElementType>({ as, ...props }: H1Props<TElementType>) { | |
const Component = as ?? 'h1'; | |
return <Component className="text-5xl font-extrabold tracking-tight" {...props} />; |
OlderNewer