Skip to content

Commit

Permalink
Merge pull request monome#180 from nattog/fix-popup-ui
Browse files Browse the repository at this point in the history
Fix - low contrast on help menu
  • Loading branch information
ngwese authored Jan 30, 2020
2 parents 669e016 + 00eb170 commit 0b5a7ad
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 47 deletions.
14 changes: 12 additions & 2 deletions web/src/help-button.css
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,22 @@
padding: 6px;
}

.help-button-popup {
font-family: monospace !important;
background-color: #F4F4F4 !important;
padding: 6px 6px 6px .4em !important;
border: 1px solid rgb(130, 130, 130, 0.1) !important;
border-left: none !important;
box-shadow: none !important;
padding-left: .4em !important;
}

.help-button-link, .help-botton-link:visited {
text-decoration: none;
color: #979797;
color: hsl(0, 0%, 46%);
}

.help-button-link:hover {
color: hsl(0, 0%, 39%);

}
}
78 changes: 33 additions & 45 deletions web/src/help-button.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,54 +3,42 @@ import Popup from 'reactjs-popup';
import './help-button.css';

const trigger = (
<div className="help-button-menu">?</div>
<div className="help-button-menu">?</div>
);

// FIXME: figure out how to define this style in css
const contentStyle = {
fontFamily: 'monospace',
backgroundColor: '#F4F4F4',
padding: '6px',
opacity: '40%',
border: '1px solid rgb(130, 130, 130, 0.1)', // magic color to approx splitter bar color
borderLeft: 'none',
boxShadow: 'none',
paddingLeft: '.4em',
};

const HelpButton = props => (
<Popup
trigger={trigger}
on='hover'
contentStyle={contentStyle}
closeOnDocumentClick
mouseLeaveDelay={180}
mouseEnterDelay={0}
position='right center'
arrow={false}>
<div>
<div>
<a className="help-button-link"
href="https://monome.org/docs/norns/"
target="_blank"
key="overview"
rel="noopener noreferrer">overview...</a>
</div>
<div>
<a className="help-button-link"
href="https://monome.org/docs/norns/script-reference/" target="_blank"
key="reference"
rel="noopener noreferrer">script reference...</a>
</div>
<div>
<a className="help-button-link"
href="/doc"
target="_blank"
key="api"
rel="noopener noreferrer">api...</a>
</div>
</div>
</Popup>
<Popup
trigger={trigger}
on='hover'
className='help-button-popup'
closeOnDocumentClick
mouseLeaveDelay={180}
mouseEnterDelay={0}
position='right center'
arrow={false}>
<div>
<div>
<a className="help-button-link"
href="https://monome.org/docs/norns/"
target="_blank"
key="overview"
rel="noopener noreferrer">overview...</a>
</div>
<div>
<a className="help-button-link"
href="https://monome.org/docs/norns/script-reference/" target="_blank"
key="reference"
rel="noopener noreferrer">script reference...</a>
</div>
<div>
<a className="help-button-link"
href="/doc"
target="_blank"
key="api"
rel="noopener noreferrer">api...</a>
</div>
</div>
</Popup>
);

export default HelpButton;

0 comments on commit 0b5a7ad

Please sign in to comment.