chore: fix blockquote renderer

This commit is contained in:
Steven
2024-01-15 20:41:37 +08:00
parent 5a723f00fa
commit fdbf2d8af2
4 changed files with 17 additions and 3 deletions

View File

@ -8,7 +8,7 @@ interface Props extends BaseProps {
const Blockquote: React.FC<Props> = ({ children }: Props) => {
return (
<blockquote>
<blockquote className="p-2 border-s-4 border-gray-300 bg-gray-50 dark:border-gray-500 dark:bg-zinc-700">
{children.map((child, index) => (
<Renderer key={`${child.type}-${index}`} index={String(index)} node={child} />
))}

View File

@ -368,6 +368,7 @@ const MemoEditor = (props: Props) => {
<Editor ref={editorRef} {...editorConfig} />
<div className="relative w-full flex flex-row justify-between items-center pt-2" onFocus={(e) => e.stopPropagation()}>
<div className="flex flex-row justify-start items-center opacity-80">
<MarkdownMenu editorRef={editorRef} />
<TagSelector editorRef={editorRef} />
<IconButton size="sm" onClick={handleUploadFileBtnClick}>
<Icon.Image className="w-5 h-5 mx-auto" />
@ -375,7 +376,6 @@ const MemoEditor = (props: Props) => {
<IconButton size="sm" onClick={handleAddMemoRelationBtnClick}>
<Icon.Link className="w-5 h-5 mx-auto" />
</IconButton>
<MarkdownMenu editorRef={editorRef} />
</div>
</div>
<ResourceListView resourceList={state.resourceList} setResourceList={handleSetResourceList} />