-
Notifications
You must be signed in to change notification settings - Fork 6
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 React Component Example To Docs #31
base: main
Are you sure you want to change the base?
Conversation
FYI: Shopify has a React implementation of this in Hydrogen already. |
Yes, we're aware! We built this package before it existed and we take a slightly different approach, so we want to show how it you can use the package with React if you'd like. |
@@ -114,7 +114,7 @@ import React, { useEffect, useState } from 'react' | |||
// Default options for the HTML conversion, using Tailwind CSS classes | |||
const defaultOptions = { | |||
scoped: false, | |||
newLineToBreak: true, // convert new line character to <br/> | |||
newLineToBreak: false, // convert new line character to <br/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this a breaking change or a fix to align the docs with the real code?
@@ -1,6 +1,6 @@ | |||
{ | |||
"name": "@thebeyondgroup/shopify-rich-text-renderer", | |||
"version": "2.0.1", | |||
"version": "2.0.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this just to bump the docs on npm?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM after the tests pass.
Add a react component to the docs/readme. Still need to add more context. I also did some clean up.
Example:
React/Hydrogen Component Example
Example of the react RichTextToHTML component in use