WebArena-ShopSmart / components /paragraph-formatter.tsx
Jack
Initial release
1067b6f
import { cn } from "@/lib/utils";
import { Text } from "./ui/text";
export const ParagraphFormatter = (props: {
paragraphs: string | null;
className?: string;
}) => {
if (!props.paragraphs) return null;
return (
<div className={cn("flex flex-col gap-2", props.className)}>
{props.paragraphs?.split("\n").map((item, i) => (
<Text key={i}>{item}</Text>
))}
</div>
);
};