-
-
Notifications
You must be signed in to change notification settings - Fork 918
Closed
Labels
☂️ area/typesThis affects typingsThis affects typings🏗 area/toolsThis affects toolingThis affects tooling👀 no/externalThis makes more sense somewhere elseThis makes more sense somewhere else👎 phase/noPost cannot or will not be acted onPost cannot or will not be acted on
Description
Subject of the issue
I think it is not possible to add components / renderers for custom tags like myCustomTag
with typescript.
Problem
Lets say I'm using a plugin that creates custom tags e.g. myCustomTag and I want to render a custom component for it:
const components = { myCustomTag: ({node, ...props}) => <MyCustomComponent {...props} /> }
<ReactMarkdown
remarkPlugins={[myPlugin]}
components={components}
/>Then I get a type error that myCustomTag is not allowed. This works fine if I set components to any.
Expected behavior
I should be able to add component renderers for custom tags without typescript complaining.
It would be super cool if I could define custom tags with their respected properties…
tawaniwannesdebacker
Metadata
Metadata
Assignees
Labels
☂️ area/typesThis affects typingsThis affects typings🏗 area/toolsThis affects toolingThis affects tooling👀 no/externalThis makes more sense somewhere elseThis makes more sense somewhere else👎 phase/noPost cannot or will not be acted onPost cannot or will not be acted on