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

Richtext component restproperty #41

Merged
merged 3 commits into from
Nov 8, 2019
Merged

Richtext component restproperty #41

merged 3 commits into from
Nov 8, 2019

Conversation

hypervillain
Copy link
Contributor

Following #35, we needed a way to pass props (like className) to the wrapper element created by RichText.

Given this call to RichText:

<RichText
 render={myField}
 Component="div"
 className="my-class-name"
 data-attribute="data"
/>

Your HTML markup should end up like this:

<div class="my-class-name" data-attribute="data">
    /* ... */
</div>

Note: users might forget that wrapper Component defaults to React.Fragment and therefore will not pass rest properly.

Hugo Villain and others added 3 commits September 16, 2019 15:37
it will test if the component has any given args as HTML attributes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants