Skip to content

Conversation

@pdxbmw
Copy link

@pdxbmw pdxbmw commented Jun 3, 2020

This PR creates a prop tag, which adds the ability to define the type of HTML element to render. Alternatively, by making the prop falsy, the component can render text-only.

In my case, I'm using the <Pluralize /> component in a SVG text tag, which doesn't accept span as a child element. With this change, I can either use an acceptable a tag or no element at all.

Note: span is still used by default so this shouldn't affect current users.

@pdxbmw
Copy link
Author

pdxbmw commented Jun 3, 2020

My linter added semicolons. Please let me know if you need these removed.

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