-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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
[Docs] Updated Card Docs to new format #2590
Conversation
That was fast 👍 👍 😁 |
showExpandableButton: React.PropTypes.bool, | ||
|
||
/** | ||
* Override the inline-styles of the root element. | ||
*/ | ||
* Override the inline-styles of the card's root element. |
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.
Leave this be, @oliviertassinari Will kill you 😆 😆
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.
Changed it when I had to rebase to master... Didn't realize it had already been changed, thanks!
P.S. try running |
👍 Thanks, didn't know I could do that :) |
Yeah, so many things have changed and improved recently. eslint is one of the best ones. thanks to @oliviertassinari, it was hard enforcing those rules >.> |
Cool, I remember having to wait for Travis to finish all the time :) Great stuff |
2aeb8a5
to
9537ebb
Compare
oops forgot some things, ima fix them |
@@ -13,16 +13,42 @@ const Card = React.createClass({ | |||
}, | |||
|
|||
propTypes: { | |||
/** | |||
* Whether a click on this card component expands the card. Can be set on any child of the Card component. | |||
*/ | |||
actAsExpander: React.PropTypes.bool, |
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.
also, add default prop for all the bool types, it makes it more expressive in the docs. the code generator can pick them up :D
9537ebb
to
753ab05
Compare
@@ -13,16 +13,42 @@ const Card = React.createClass({ | |||
}, | |||
|
|||
propTypes: { | |||
/** | |||
* Whether a click on this card component expands the card. Can be set on any child of the Card component. |
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.
one more thing, sorry 😁
jsdoc better be formatted like this:
/**
* Foo
*/
instead of
/**
* Foo
*/
that extra indentation.
Sorry I keep bragging 😁 It's your first contribution after a long time apparently. After one PR or 2 these bragging will drop a lot. sorry 😁 😁 |
😱 You code fast :D :D faster than I can review :P :P |
Lol, sorry :) Have to get used to these things and learn the new ones. And no worries, you are being a great help! |
No problem, glad you don't get mad at me 😅 😅
Yes, that's true. and yup add it please. thanks 👍 👍 |
Sorry for the silly question, but if a bool prop is not defined, it is considered false, right? So in the getDefaultProps() I would just set it to false? |
@Zadielerick Yeah, that's right 😁 set it to false. doing this will tip the parser to generate documentation explicitly expressing that it will default to false. That's only good practice, no effect on the logic. |
@subjectix Thanks alot! Almost done :) |
753ab05
to
76d3b5a
Compare
import FlatButton from 'material-ui/lib/flat-button'; | ||
import CardText from 'material-ui/lib/card/card-text'; | ||
|
||
const CardExampleWithAvatar = React.createClass({ |
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.
Can we use the stateless function component pattern for those examples?
getDefaultProps() { | ||
return { | ||
expandable: false, | ||
initiallyExpanded: true, |
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 defaults to false.
@oliviertassinari I'm going to merge this and fix the issues myself, because I need these changes in my PR. |
[Docs] Updated Card Docs to new format
@subjectix Sure 👍. I'm working on moving the files for #2592 |
Cards documentation update