refactor and simplify things

This commit is contained in:
MapleLeaf
2021-12-22 10:35:55 -06:00
parent 7b3ce42138
commit 765c6fadbb
26 changed files with 351 additions and 441 deletions

14
src/components/text.tsx Normal file
View File

@@ -0,0 +1,14 @@
import type { ReactNode } from "react"
import React from "react"
export type TextProps = {
children?: ReactNode
}
export function Text(props: TextProps) {
return (
<reacord-element createNode={() => ({ type: "textElement", children: [] })}>
{props.children}
</reacord-element>
)
}