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

Add 'as' and 'markupClass' Props #39

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

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