-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
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] Add documentation for containerElement in RaisedButon #6199
Conversation
src/RaisedButton/RaisedButton.js
Outdated
@@ -134,6 +134,13 @@ class RaisedButton extends Component { | |||
*/ | |||
className: PropTypes.string, | |||
/** | |||
* This is the Link tag that can be used inside RaisedButton. |
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.
That doesn't sound quite right...
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.
Made a change to that comment. I am still not sure about wording the documentation for containerElement.
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.
At the very least, we should be consistent with the FlatButton and RaisedButton.
I think that we need the same PR for the next branch, we have a property for the same use case.
src/RaisedButton/RaisedButton.js
Outdated
@@ -134,6 +134,13 @@ class RaisedButton extends Component { | |||
*/ | |||
className: PropTypes.string, | |||
/** | |||
* An element like Link tag or a string can be used inside RaisedButton. |
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 think that we should make the description generic, i.e. always the same in proptypes documentatino generator.
We have that one on the GridTitle
that's a bit too verbose but more explicit:
/**
* Either a string used as tag name for the tile root element, or a ReactElement.
* This is useful when you have, for example, a custom implementation of
* a navigation link (that knows about your routes) and you want to use it as the primary tile action.
* In case you pass a ReactElement, please ensure that it passes all props,
* accepts styles overrides and render it's children.
*/
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.
Updated it and made a PR for FlatButton.
sure. |
It is consistent between FlatButton, RaisedButton and ListItem. Thanks @lourd for the PR on ListItem. |
@oliviertassinari Are you sure that containerElement is a prop in the |
@Shahrukh-Zindani Do you want the answer or I let you dig in? (hint: the property name is different and more intuitive) |
Got it. Let me dig in. |
Documentation for containerElement in RaisedButton.
Close issue #5647