mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-12 00:37:19 +00:00
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:
@@ -336,19 +336,21 @@ export default class Output extends Component<Props, State> {
|
|||||||
<AddIcon />
|
<AddIcon />
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
<button class={style.button} onClick={this.onRotateClick} title="Rotate image">
|
<div class={style.buttonsNoWrap}>
|
||||||
<RotateIcon />
|
<button class={style.button} onClick={this.onRotateClick} title="Rotate image">
|
||||||
</button>
|
<RotateIcon />
|
||||||
<button
|
</button>
|
||||||
class={`${style.button} ${altBackground ? style.active : ''}`}
|
<button
|
||||||
onClick={this.toggleBackground}
|
class={`${style.button} ${altBackground ? style.active : ''}`}
|
||||||
title="Change canvas color"
|
onClick={this.toggleBackground}
|
||||||
>
|
title="Change canvas color"
|
||||||
{altBackground
|
>
|
||||||
? <ToggleBackgroundActiveIcon />
|
{altBackground
|
||||||
: <ToggleBackgroundIcon />
|
? <ToggleBackgroundActiveIcon />
|
||||||
}
|
: <ToggleBackgroundIcon />
|
||||||
</button>
|
}
|
||||||
|
</button>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -62,6 +62,7 @@
|
|||||||
left: 320px;
|
left: 320px;
|
||||||
right: 320px;
|
right: 320px;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
|
flex-wrap: wrap-reverse;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -152,3 +153,12 @@
|
|||||||
left: 0;
|
left: 0;
|
||||||
padding: 9px;
|
padding: 9px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.buttons-no-wrap {
|
||||||
|
display: flex;
|
||||||
|
pointer-events: none;
|
||||||
|
|
||||||
|
& > * {
|
||||||
|
pointer-events: auto;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user