refactor and simplify things
This commit is contained in:
14
src/components/text.tsx
Normal file
14
src/components/text.tsx
Normal 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>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user