-
Notifications
You must be signed in to change notification settings - Fork 78
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
fix: update prop spreading for ActionBar #219
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.
Looks good. 🚢
src/ActionBar/ActionBar.js
Outdated
<p className='fd-action-bar__description'>{description} </p> | ||
<h1 | ||
className='fd-action-bar__title' | ||
{...titleProps}>{title}</h1> |
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.
After looking at this some more, I think we want the spread to occur first and then the hard-coded props. Otherwise, consumers could literally override required prop values. In these two cases, it will also leverage some capabilities of the classnames
story to make sure they can include additional classes.
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.
Good call - I'll need to fix this on the other pr's too
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.
Merging blocked until fundamental-bot admin rights are restored.
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 the changes look good. 🚢 I can approve once merging is allowed.
{ | ||
name: 'buttonProps', | ||
description: 'object - additional props to be spread to the ActionBarBack\'s button.' | ||
}, |
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.
The buttonProps
are actually for the ActionBarBack
component. That said, I would like to circle back in another story and adjust the documentation pages to properly define all the components AND sub components AND each of their respective props better.
See #238
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.
Let's roll 🎢
* update prop spreading for ActionBar * move spreads * update documentation with new props
Adds additional props to enable spreading into button, h1 and p elements.