Skip to content
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: Prop spreading for SideNavigation #248

Merged
merged 2 commits into from
Jan 17, 2019

Conversation

cjskillingstad
Copy link
Contributor

@cjskillingstad cjskillingstad commented Jan 17, 2019

  • Spread props to SideNavigation's elements
  • Update unit tests

The documentation for this component didn't include the props for the component that I added prop spreading to so I didn't update docs.

return (
<div
className={`fd-side-nav__group${className ? ' ' + className : ''}`}
{...rest}>
<h1 className='fd-side-nav__title'>{title}</h1>
<h1 {...headerProps} className='fd-side-nav__title'>{title}</h1>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jbadan had a similar change to a different component and used titleProps as the name, which seems to fit a little better since the content of this element is the title prop.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On an unrelated note, this element should assume the use of <h1>. There should only be one <h1> per page and assuming it will exist in the side navigation seems wrong. I created #249 to address that in a future story.

Copy link
Contributor

@greg-a-smith greg-a-smith left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. 🚢

@cjskillingstad cjskillingstad merged commit 02e1d70 into master Jan 17, 2019
@cjskillingstad cjskillingstad deleted the fix/spread-sidenavigation branch January 17, 2019 21:35
greg-a-smith pushed a commit that referenced this pull request Mar 5, 2019
* Add prop spreading

* Add spread
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants