Skip to content

Commit

Permalink
fix: modify the ui of RichText
Browse files Browse the repository at this point in the history
  • Loading branch information
axnir committed May 14, 2023
1 parent fdce749 commit e01a452
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions app/components/notion/RichText.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export default function RichText({
text,
annotations,
}: TextRichTextItemResponse & { isNewLine?: boolean }) {
const className = clsx({
const classes = clsx({
'line-through': annotations.strikethrough,
'font-bold': annotations.bold,
italic: annotations.italic,
Expand All @@ -32,7 +32,7 @@ export default function RichText({
block: isNewLine,
},
'text-[#175199]',
className
classes
)}
// TODO bg color
style={annotations.color ? { color: annotations.color } : {}}
Expand All @@ -42,5 +42,16 @@ export default function RichText({
);
}

return <span>{text.content}</span>;
return (
<span
className={clsx(
{
block: isNewLine,
},
classes
)}
>
{text.content}
</span>
);
}

1 comment on commit e01a452

@vercel
Copy link

@vercel vercel bot commented on e01a452 May 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

blog – ./

blog-axnir.vercel.app
blog-git-master-axnir.vercel.app
blog-lyart-sigma.vercel.app

Please sign in to comment.