Best way to type and customize components? #1764
-
const ParagraphBlock = ({children}) => { // What props are passed into ParagraphBlock?
return (
<p>
{children}
</p>
)
}
const plugins = createPlugins<MyValue>([
createParagraphPlugin({
component: ParagraphBlock, // What's the proper type of ParagraphBlock here?
})
]
const plugins = createPlugins<MyValue>([
createHeadingPlugin({
component: SectionBlock,
options: {
levels: 3,
},
})
] |
Beta Was this translation helpful? Give feedback.
Answered by
zbeyens
Aug 9, 2022
Replies: 1 comment
-
New guide: https://platejs.org/docs/plugin |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
zbeyens
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
New guide: https://platejs.org/docs/plugin