memos/web/src/components/MemoContent/Italic.tsx
Anubhav Singh a63d9b471b
feat: update ItalicNode to use repeated children instead of content (#4566)
* feat: update ItalicNode to use repeated children instead of content

* chore: update gomark dependency to latest version

---------

Co-authored-by: Anubhav Singh <anubhav@mail.techindika.com>
2025-03-28 16:15:03 +08:00

19 lines
399 B
TypeScript

import { Node } from "@/types/proto/api/v1/markdown_service";
import Renderer from "./Renderer";
interface Props {
symbol: string;
children: Node[];
}
const Italic: React.FC<Props> = ({ children }: Props) => {
return (
<em>
{children.map((child, index) => (
<Renderer key={index} index={index.toString()} node={child} />
))}
</em>
);
};
export default Italic;