Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support passing 'id' (or any other arbitrary 'div' tags) #792

Closed
4 tasks done
CHE1RON opened this issue Nov 8, 2023 · 2 comments
Closed
4 tasks done

Support passing 'id' (or any other arbitrary 'div' tags) #792

CHE1RON opened this issue Nov 8, 2023 · 2 comments
Labels
🤷 no/invalid This cannot be acted upon 👎 phase/no Post cannot or will not be acted on

Comments

@CHE1RON
Copy link

CHE1RON commented Nov 8, 2023

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 #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 of aria-labelledby referencing this without having to wrap it in yet another div!

Alternatives

It might be solved by having div props being passed as single argument 🤔

@github-actions github-actions bot added 👋 phase/new Post is being triaged automatically 🤞 phase/open Post is being triaged manually and removed 👋 phase/new Post is being triaged automatically labels Nov 8, 2023
@wooorm
Copy link
Member

wooorm commented Nov 8, 2023

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!

@wooorm wooorm closed this as completed Nov 8, 2023
@wooorm wooorm added the 🤷 no/invalid This cannot be acted upon label Nov 8, 2023

This comment has been minimized.

@github-actions github-actions bot added 👎 phase/no Post cannot or will not be acted on and removed 🤞 phase/open Post is being triaged manually labels Nov 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🤷 no/invalid This cannot be acted upon 👎 phase/no Post cannot or will not be acted on
Development

No branches or pull requests

2 participants