-
Notifications
You must be signed in to change notification settings - Fork 64
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
fix(docs): alert docs - alert management import clarification #470
fix(docs): alert docs - alert management import clarification #470
Conversation
f7585a2
to
94f1e48
Compare
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.
This is a great update @bc-maksym-konohorov. As a consumer of BigDesign, this does make it more clear for me. Thanks for taking the time to improve our docs!
}} | ||
|
||
{/* jsx-to-string:end */} | ||
{` |
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.
We should prob investigate the extra }
you are mentioning.
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.
My suggestion - jsx-to-string transformer works in a weird way, it depends on indentation in code, I moved two closing curly braces }}
back, and it rendered it right. but there was a problem when you add just regular js code line before function. it rendered it incorrectly, and also linter on commit hook was breaking formatting.
</Text> | ||
|
||
<CodeSnippet> |
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.
Maybe we should add an example on how to create a useAlerts
hook.
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.
Agree it's a good idea, but I need to play with hook to become familiar with it, and unfortunately I'm not sure If I will have time for that in this sprint.
Slightly changed docs for
Alerts
page.Added some information regarding how to use
createAlertsManager
instance:Changed code in
CodeSnippet
to be string, as it didn't render correctly, in was rendering extra}
character, which could confuse consumers of this example: