-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
Pass additional properties to a and span elements #15
Comments
👋 Could you tell us more about the higher-level thing you want to achieve? Maybe that’s better done in a custom-made plugin? |
I need to have something like this:
So I need to be able to pass At the moment I have the following for the
But without classes and the |
Might your case also in the end need for example classes or icons for local/internal links ( |
No, we use icons only for external links. Internal links are managed by gatsby-plugin-catch-links. |
Would the CSS selector |
Yes, |
Ah great!! For the properties, that can be done! Would you be interested in working on a PR for that? Something like: contentProperties = settings.contentProperties || {}
// ...
data: {hName: 'span', hProperties: extend(true, contentProperties), hChildren: extend(true, content)} In |
Yes, sure, I've created the PR above. But I'm new to programming, so I don't really know what's the right way to do it. |
Closed by GH-16. |
I would like to be able to pass additional properties to the link itself and the
span
element, likeclassName
(for both elements) androle: 'img'
forspan
.At the moment I had to add another
span
inside the givenspan
to do this:content: h('span', {role: 'img', class: 'anticon'}, s('svg',...))
. And I can't style the link, as there is no way to passclassName
to it.The text was updated successfully, but these errors were encountered: