-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Addressing Issue #531 - Documentation: Components should indicate if they take native props #4215
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
Addressing Issue #531 - Documentation: Components should indicate if they take native props #4215
Conversation
…rd, Icon, and Image
…rsona, PivotItem, ResizeGroup, ScrollablePane, TextField, Toggle, and Tooltip
|
Gave some feedback in person around the content of the message. This is a great change--really appreciate the clarity this adds. |
…ent and applied to Fabric components
micahgodbolt
left a comment
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.
Loving all the improvements to documentation. 80% of the feedback I get about why people chose fabric is because of our amazing documentation. Keep it up!
| if (this.props.allowNativeProps) { | ||
| let elementString: string | string[] | JSX.Element = this.props.nativePropsElement || 'div', | ||
| componentString: JSX.Element | undefined; | ||
| // componentString: JSX.Element = <> this 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.
remove commented code
| </ExampleCard> | ||
| </div> | ||
| } | ||
| allowNativeProps={ 'PivitItem' } |
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.
spelling
| } | ||
|
|
||
| if (typeof this.props.allowNativeProps === 'string') { | ||
| // titleString = <> <code>{ this.props.allowNativeProps }</code></>; |
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.
same
Pull request checklist
$ npm run changeDescription of changes
Added a info MessageBar to indicate when native props can be used on a component: