24 lines
612 B
TypeScript
24 lines
612 B
TypeScript
interface PostContentProps {
|
|
content: string;
|
|
tags?: string[];
|
|
}
|
|
|
|
export function PostContent({ content, tags }: PostContentProps) {
|
|
return (
|
|
<div className="px-4 pb-2 text-body text-foreground whitespace-pre-wrap">
|
|
{content}
|
|
{tags && (
|
|
<div className="mt-2 flex flex-wrap gap-2">
|
|
{tags.map((tag) => (
|
|
<span
|
|
key={tag}
|
|
className="text-primary/80 hover:text-primary hover:underline cursor-pointer text-xs transition-colors"
|
|
>
|
|
{tag}
|
|
</span>
|
|
))}
|
|
</div>
|
|
)}
|
|
</div>
|
|
);
|
|
}
|