azavea / pwd-unitybar

Unified header for PWD Stormwater web apps
https://staging-pwd-unitybar.netlify.com/
Apache License 2.0
1 stars 2 forks source link

Add appNameClickHandler prop #77

Closed kellyi closed 5 years ago

kellyi commented 5 years ago

Overview

Add appNameClickHandler prop which host applications can use to pass a function in to be called when clicking the app name. This is done in order to enable using the app name for routing via react-router functions.

Connects https://github.com/azavea/pwd-stormwater-interactive/issues/524

Notes

~Having slight trouble getting the text to keep identical formatting which you can see when toggling. In practice toggling would likely not happen within the same app session but for sake of regularity it'd be nice to have both h1 and button versions be the same.~ Fixed this and a tabindex issue with Scott's help!

Testing Instructions

kellyi commented 5 years ago

~Before merging, the demo toggle hasAppNameClickHandler prop needs to be renamed to just appNameClickHandler, and it should visibly toggle between function and null.~

This was done.

kellyi commented 5 years ago

Awesome, thanks for your help with this!