Skip to content

Conversation

@Saeris
Copy link

@Saeris Saeris commented Apr 2, 2020

Added two new props to provide better control over the rendered wrapper element.

as (default: 'div') will accept a component or a string to set the wrapping element

markdownClass (default: 'markdown') will accept a string which will be added to the classNames list on the wrapping element. A falsy value will result in no class name being added.

For myself this solves a use-case where I wanted the wrapper element to be a list item instead of a div and I didn't want to add a class name either. This should allow better compatibility with styled-components as well, allowing users of that library to change the rendered element using the forwardedAs prop from that library.

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.

1 participant