refactor and simplify things
This commit is contained in:
17
src/components/embed-field.tsx
Normal file
17
src/components/embed-field.tsx
Normal file
@@ -0,0 +1,17 @@
|
||||
import React from "react"
|
||||
|
||||
export type EmbedFieldProps = {
|
||||
name: string
|
||||
children: React.ReactNode
|
||||
inline?: boolean
|
||||
}
|
||||
|
||||
export function EmbedField(props: EmbedFieldProps) {
|
||||
return (
|
||||
<reacord-element
|
||||
createNode={() => ({ ...props, type: "embedField", children: [] })}
|
||||
>
|
||||
{props.children}
|
||||
</reacord-element>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user