Closed CHE1RON closed 1 year ago
Hey!
We don’t generate a div
normally. Only with className
.
If you want a div
with an id
or whatever else, write one:
<div id="x">
<Markdown><Markdown>
</div>
This seems more like #781. Either we can remove className
, and this div
, or we can pass all other properties through to a div
. Leave a comment there if you feel for one or the other!
Hi! This was closed. Team: If this was fixed, please add phase/solved
. Otherwise, please add one of the no/*
labels.
Initial checklist
Problem
When rendering
Markdown
, it wraps all content inside a<div>
, but does not provide any means to pass arbitrary or even the most basic props to this element (className
being the only one).I stumbled across https://github.com/remarkjs/react-markdown/issues/242, which I think is about exactly this, but was discarded as 'add props to components being rendered inside this
div
tag' - however, the issue still stands 😁Solution
I'd be happy to open a PR for at least
id
to be an allowed property - think ofaria-labelledby
referencing this without having to wrap it in yet anotherdiv
!Alternatives
It might be solved by having
div
props being passed as single argument 🤔