-
Notifications
You must be signed in to change notification settings - Fork 38
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
Added information about the Accordion to the README of components #198
base: master
Are you sure you want to change the base?
Conversation
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.
Thanks, @paulvazbad I think we should do more of this documentation often. Would be nice to write up most of the docs for most of the components as well, but they're a lot.
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.
Thankyou @paulvazbad, i too think this the step in the right direction, i will also try to document other components as i go through them.
| title |`string`| | Title of the Accordion | | ||
|
||
``` | ||
<div className={`accordion ${this.props.border ? 'border' : ''}`}> |
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.
Thanks for this PR @paulvazbad.
I believe adding the full HTML of the component to the documentation would make the readME too bulky and tough to read.
Good code should be self-documenting so we can skip this part.
We should focus on documenting the props the components use, which is what you have done.
Thanks.
cc @rhenshaw56 what do you think?
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.
I agree @jomadoye ... I think having sample HTML of how to use the component could be helpful, but it looks like this an example of the code generated by the component?
Are there any best practices for React component comments... I see a generation tool that appears to be popular:
https://github.com/styleguidist/react-styleguidist
For what it's worth, here's the format I came up with for the one component I actually documented:
https://github.com/openmrs/openmrs-react-components/blob/master/src/components/list/List.jsx#L7
I'm not necessarily married to that format (or any other), but would be great to pick a format and standardize on it.
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.
Thanks @paulvazbad ! I made one comment on the PR.
| title |`string`| | Title of the Accordion | | ||
|
||
``` | ||
<div className={`accordion ${this.props.border ? 'border' : ''}`}> |
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.
I agree @jomadoye ... I think having sample HTML of how to use the component could be helpful, but it looks like this an example of the code generated by the component?
Are there any best practices for React component comments... I see a generation tool that appears to be popular:
https://github.com/styleguidist/react-styleguidist
For what it's worth, here's the format I came up with for the one component I actually documented:
https://github.com/openmrs/openmrs-react-components/blob/master/src/components/list/List.jsx#L7
I'm not necessarily married to that format (or any other), but would be great to pick a format and standardize on it.
No description provided.