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

Update renderContent to accept attributes #2325

Merged
merged 5 commits into from
Oct 18, 2024
Merged

Conversation

camillof
Copy link
Contributor

Description

Updates renderContent utils method, so it can now accept (optional) attributes, that will be attached to the provided React element

More Details

This doesn't include string content, because the result of renderHTML(sanitize(content)); could be an array of elements, so in that case we have a few options:
A. apply the attributes to all the elements
B. wrap the elements in a div and apply the attributes to that div (but again, we would be in the scenario of applying invalid attributes)
C. apply the attributes to the first element

Corresponding Issue

Resolves #2120

Screenshots

image image

Reviewing this pull request? Check out our Code Review Practices guide if you haven't already!

Copy link

welcome bot commented Oct 15, 2024

Thank you for opening this pull request with us! Be sure to follow our Pull Request Practices. Let us know if you have any questions on Slack.

Copy link
Member

@julianguyen julianguyen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thank you!

@julianguyen julianguyen merged commit 2bdc126 into main Oct 18, 2024
6 checks passed
Copy link

welcome bot commented Oct 18, 2024

Thank you for merging this pull request with us! If you haven't already, in another pull request, please add yourself to our About page.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add ARIA attribute to element that opens the Tooltip component
2 participants