Avoid wrapping a single button (#357)

* Avoid wrapping a single button

* Making the zoom controls appear on the bottom, when the controls are positioned on the bottom
This commit is contained in:
Jake Archibald
2018-11-30 11:44:15 +00:00
committed by GitHub
parent fca7a5350d
commit 80dfa03b94
2 changed files with 25 additions and 13 deletions

View File

@@ -336,19 +336,21 @@ export default class Output extends Component<Props, State> {
<AddIcon />
</button>
</div>
<button class={style.button} onClick={this.onRotateClick} title="Rotate image">
<RotateIcon />
</button>
<button
class={`${style.button} ${altBackground ? style.active : ''}`}
onClick={this.toggleBackground}
title="Change canvas color"
>
{altBackground
? <ToggleBackgroundActiveIcon />
: <ToggleBackgroundIcon />
}
</button>
<div class={style.buttonsNoWrap}>
<button class={style.button} onClick={this.onRotateClick} title="Rotate image">
<RotateIcon />
</button>
<button
class={`${style.button} ${altBackground ? style.active : ''}`}
onClick={this.toggleBackground}
title="Change canvas color"
>
{altBackground
? <ToggleBackgroundActiveIcon />
: <ToggleBackgroundIcon />
}
</button>
</div>
</div>
</div>
);

View File

@@ -62,6 +62,7 @@
left: 320px;
right: 320px;
bottom: 0;
flex-wrap: wrap-reverse;
}
}
@@ -152,3 +153,12 @@
left: 0;
padding: 9px;
}
.buttons-no-wrap {
display: flex;
pointer-events: none;
& > * {
pointer-events: auto;
}
}