A short inline quotation.
<P> When Dave asks HAL to open the pod bay door, HAL answers:{' '} <Q cite="https://www.imdb.com/title/tt0062622/quotes/?item=qt0396921&ref_=ext_shr_lnk">I'm sorry, Dave. I'm afraid I can't do that.</Q></P>
Here's the <Q />
component in action.
When Dave asks HAL to open the pod bay door, HAL answers: I'm sorry, Dave. I'm afraid I can't do that.
import { forwardRef, type QuoteHTMLAttributes, type DetailedHTMLProps } from 'react'import { cn } from '#app/utils/tailwind-merge.ts'
/** * A Q (quote) component. */const Q = forwardRef<HTMLQuoteElement, DetailedHTMLProps<QuoteHTMLAttributes<HTMLQuoteElement>, HTMLQuoteElement>>(({ className, ...props }, ref) => ( <q ref={ref} className={cn('q', className)} {...props} />))Q.displayName = 'Q'
export { Q }
.q { @apply font-sans italic before:content-['“'] after:content-['”'];}