We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 33a2134 + 915f969 commit 5457a0dCopy full SHA for 5457a0d
1 file changed
src/components/puck/Paragraph.tsx
@@ -10,9 +10,17 @@ export const Paragraph: React.FC<ParagraphProps> = ({
10
text,
11
textColor = "text-black"
12
}) => (
13
- <p className={textColor}>
14
- {text}
15
- </p>
+ typeof text === "string"
+ ? (
+ <p className={textColor}>
16
+ {text}
17
+ </p>
18
+ )
19
+ : (
20
+ <div className={textColor}>
21
22
+ </div>
23
24
)
25
26
export const ParagraphConfig: ComponentConfig<ParagraphProps> = {
0 commit comments