mirror of
https://github.com/usememos/memos.git
synced 2025-03-28 08:30:11 +01:00
20 lines
431 B
TypeScript
20 lines
431 B
TypeScript
import { Node } from "@/types/node";
|
|
import Renderer from "./Renderer";
|
|
import { BaseProps } from "./types";
|
|
|
|
interface Props extends BaseProps {
|
|
children: Node[];
|
|
}
|
|
|
|
const Paragraph: React.FC<Props> = ({ children }: Props) => {
|
|
return (
|
|
<p>
|
|
{children.map((child, index) => (
|
|
<Renderer key={`${child.type}-${index}`} index={String(index)} node={child} />
|
|
))}
|
|
</p>
|
|
);
|
|
};
|
|
|
|
export default Paragraph;
|