Merge pull request #314 from orangemug/fix/various-fixes

Small bug fixes
This commit is contained in:
Orange Mug 2018-06-03 17:35:44 +01:00 committed by GitHub
commit a28a417ebc
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 29 additions and 16 deletions

View file

@ -100,19 +100,24 @@ export default class Toolbar extends React.Component {
render() { render() {
return <div className='maputnik-toolbar'> return <div className='maputnik-toolbar'>
<div className="maputnik-toolbar__inner"> <div className="maputnik-toolbar__inner">
<ToolbarLink <div
tabIndex="2" className="maputnik-toolbar-logo-container"
href={"https://github.com/maputnik/editor"}
className="maputnik-toolbar-logo"
> >
<a tabIndex="1" className="maputnik-toolbar-skip" href="#skip-menu"> <a className="maputnik-toolbar-skip" href="#skip-menu">
Skip navigation Skip navigation
</a> </a>
<img src={logoImage} alt="Maputnik" /> <a
<h1>Maputnik href="https://github.com/maputnik/editor"
<span className="maputnik-toolbar-version">v{pkgJson.version}</span> rel="noopener noreferrer"
</h1> target="_blank"
</ToolbarLink> className="maputnik-toolbar-logo"
>
<img src={logoImage} alt="Maputnik" />
<h1>Maputnik
<span className="maputnik-toolbar-version">v{pkgJson.version}</span>
</h1>
</a>
</div>
<div className="maputnik-toolbar__actions"> <div className="maputnik-toolbar__actions">
<ToolbarAction wdKey="nav:open" onClick={this.props.onToggleModal.bind(this, 'open')}> <ToolbarAction wdKey="nav:open" onClick={this.props.onToggleModal.bind(this, 'open')}>
<OpenIcon /> <OpenIcon />

View file

@ -4,7 +4,7 @@ import PropTypes from 'prop-types'
class SelectInput extends React.Component { class SelectInput extends React.Component {
static propTypes = { static propTypes = {
value: PropTypes.string.isRequired, value: PropTypes.string.isRequired,
"data-wd-key": PropTypes.string.isRequired, "data-wd-key": PropTypes.string,
options: PropTypes.array.isRequired, options: PropTypes.array.isRequired,
style: PropTypes.object, style: PropTypes.object,
onChange: PropTypes.func.isRequired, onChange: PropTypes.func.isRequired,

View file

@ -8,7 +8,7 @@ import SelectInput from '../inputs/SelectInput'
class LayerTypeBlock extends React.Component { class LayerTypeBlock extends React.Component {
static propTypes = { static propTypes = {
value: PropTypes.string.isRequired, value: PropTypes.string.isRequired,
wdKey: PropTypes.string.isRequired, wdKey: PropTypes.string,
onChange: PropTypes.func.isRequired, onChange: PropTypes.func.isRequired,
} }

View file

@ -1,5 +1,8 @@
// See <https://github.com/nkbt/react-collapse/commit/4f4fbce7c6c07b082dc62062338c9294c656f9df> // See <https://github.com/nkbt/react-collapse/commit/4f4fbce7c6c07b082dc62062338c9294c656f9df>
.react-collapse-container { .react-collapse-container {
position: relative; display: flex;
overflow: hidden;
> * {
flex: 1;
}
} }

View file

@ -9,7 +9,13 @@
background-color: $color-black; background-color: $color-black;
} }
.maputnik-toolbar-logo-container {
position: relative;
}
.maputnik-toolbar-logo { .maputnik-toolbar-logo {
text-decoration: none;
display: block;
flex: 0 0 180px; flex: 0 0 180px;
width: 180px; width: 180px;
text-align: left; text-align: left;
@ -21,6 +27,7 @@
h1 { h1 {
display: inline; display: inline;
line-height: 26px;
} }
img { img {
@ -51,9 +58,7 @@
} }
.maputnik-toolbar-version { .maputnik-toolbar-version {
position: absolute;
font-size: 10px; font-size: 10px;
bottom: -2px;
margin-left: 4px; margin-left: 4px;
white-space: nowrap; white-space: nowrap;
} }