mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-12 08:47:31 +00:00
Button to copy settings to the other side
This commit is contained in:
@@ -72,6 +72,7 @@ interface Props {
|
||||
onEncoderTypeChange(newType: EncoderType): void;
|
||||
onEncoderOptionsChange(newOptions: EncoderOptions): void;
|
||||
onPreprocessorOptionsChange(newOptions: PreprocessorState): void;
|
||||
onCopyToOtherClick(): void;
|
||||
}
|
||||
|
||||
interface State {
|
||||
@@ -120,6 +121,12 @@ export default class Options extends Component<Props, State> {
|
||||
);
|
||||
}
|
||||
|
||||
@bind
|
||||
onCopyToOtherClick(event: Event) {
|
||||
event.preventDefault();
|
||||
this.props.onCopyToOtherClick();
|
||||
}
|
||||
|
||||
render(
|
||||
{
|
||||
sourceImageFile,
|
||||
@@ -217,6 +224,10 @@ export default class Options extends Component<Props, State> {
|
||||
}
|
||||
</div>
|
||||
|
||||
<div class={style.row}>
|
||||
<button onClick={this.onCopyToOtherClick}>Copy settings to other side</button>
|
||||
</div>
|
||||
|
||||
<div class={style.sizeDetails}>
|
||||
<FileSize
|
||||
class={style.size}
|
||||
|
||||
Reference in New Issue
Block a user