Skip to content

Commit

Permalink
Make Unity Bar sticky in demo page
Browse files Browse the repository at this point in the history
Closes #81
  • Loading branch information
Kelly Innes committed Apr 26, 2019
1 parent 9bcf5ca commit 2ad33fd
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 38 deletions.
80 changes: 42 additions & 38 deletions Demo.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -229,44 +229,48 @@ class Demo extends Component {

return (
<div>
<UnityBar
currentAppName={currentAppName}
appNameClickHandler={
hasAppNameClickHandler ? this.handleAppNameClick : null
}
hasLogo={hasLogo}
theme={theme}
authenticated={authenticated}
access={access}
hasMapAction={hasMapAction}
mapActionTitle={mapActionTitle}
mapActionHandler={() => {
window.console.log('map action clicked');
}}
hasHelpAction={hasHelpAction}
helpActionTitle={helpActionTitle}
helpActionHandler={() => {
window.console.log('help action clicked');
}}
hasSettings={hasSettings}
settingsHandler={() => {
window.console.log('settings action clicked');
}}
searchChangeHandler={this.handleSearchChange}
searchSubmitHandler={this.handleSearchSubmit}
hasSearch={hasSearch}
searchBoxValue={searchValue}
parcelViewerUrl={parcelViewerUrl}
showParcelViewerLink={showParcelViewerLink}
creditsExplorerUrl={creditsExplorerUrl}
showCreditsExplorerLink={showCreditsExplorerLink}
retrofitMapUrl={retrofitMapUrl}
showRetrofitMapLink={showRetrofitMapLink}
retrofitCampaignUrl={retrofitCampaignUrl}
showRetrofitCampaignLink={showRetrofitCampaignLink}
isSearching={isSearching}
searchingIndicator={searchingElement}
/>
<div style={{ position: 'fixed', width: '100%' }}>
<UnityBar
currentAppName={currentAppName}
appNameClickHandler={
hasAppNameClickHandler
? this.handleAppNameClick
: null
}
hasLogo={hasLogo}
theme={theme}
authenticated={authenticated}
access={access}
hasMapAction={hasMapAction}
mapActionTitle={mapActionTitle}
mapActionHandler={() => {
window.console.log('map action clicked');
}}
hasHelpAction={hasHelpAction}
helpActionTitle={helpActionTitle}
helpActionHandler={() => {
window.console.log('help action clicked');
}}
hasSettings={hasSettings}
settingsHandler={() => {
window.console.log('settings action clicked');
}}
searchChangeHandler={this.handleSearchChange}
searchSubmitHandler={this.handleSearchSubmit}
hasSearch={hasSearch}
searchBoxValue={searchValue}
parcelViewerUrl={parcelViewerUrl}
showParcelViewerLink={showParcelViewerLink}
creditsExplorerUrl={creditsExplorerUrl}
showCreditsExplorerLink={showCreditsExplorerLink}
retrofitMapUrl={retrofitMapUrl}
showRetrofitMapLink={showRetrofitMapLink}
retrofitCampaignUrl={retrofitCampaignUrl}
showRetrofitCampaignLink={showRetrofitCampaignLink}
isSearching={isSearching}
searchingIndicator={searchingElement}
/>
</div>
<DemoToggles
hasSearch={hasSearch}
searchValue={searchValue}
Expand Down
3 changes: 3 additions & 0 deletions DemoToggles.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ const demoTogglesStyles = Object.freeze({
padding: '0.5rem 2rem',
display: 'flex',
justifyContent: 'center',
top: '60px',
position: 'fixed',
height: 'calc(100% - 60px)',
}),
tableStyles: Object.freeze({
width: '80%',
Expand Down

0 comments on commit 2ad33fd

Please sign in to comment.