ar-test/app/components/ui/text-pair.tsx

20 lines
541 B
TypeScript

import { Text } from '~/components/ui/text';
import { cn } from '~/lib/utils';
interface TextPairProps {
title: string;
meta: string;
as?: 'p' | 'h3';
className?: string;
}
// A truncating title with a muted caption underneath
export function TextPair({ title, meta, as = 'p', className }: TextPairProps) {
return (
<div className={cn('min-w-0', className)}>
<Text as={as} variant='body-strong' truncate>{title}</Text>
<Text variant='meta' truncate>{meta}</Text>
</div>
);
}