Button to copy settings to the other side

This commit is contained in:
Jake Archibald
2018-08-22 18:03:41 +01:00
parent ea5d3c2d78
commit 4db43ccd4e
3 changed files with 114 additions and 91 deletions

View File

@@ -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}