Added information about the Accordion to the README of components#198
Added information about the Accordion to the README of components#198paulvazbad wants to merge 1 commit intoopenmrs:masterfrom
Conversation
rhenshaw56
left a comment
There was a problem hiding this comment.
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.
beingtmk
left a comment
There was a problem hiding this comment.
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.
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.
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.
mogoodrich
left a comment
There was a problem hiding this comment.
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.
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.