From 9de95f74fe36040b08a25d9bed8cbc0857f2c011 Mon Sep 17 00:00:00 2001 From: Jake Archibald Date: Wed, 9 Dec 2020 14:36:50 +0000 Subject: [PATCH] Copy setting button --- src/client/lazy-app/Compress/Options/index.tsx | 14 +++++++++++++- src/client/lazy-app/Compress/Options/style.css | 9 +++++++++ src/client/lazy-app/Compress/index.tsx | 5 +++-- src/client/lazy-app/icons/index.tsx | 6 ++++++ 4 files changed, 31 insertions(+), 3 deletions(-) diff --git a/src/client/lazy-app/Compress/Options/index.tsx b/src/client/lazy-app/Compress/Options/index.tsx index d9c2bf3d..7f531098 100644 --- a/src/client/lazy-app/Compress/Options/index.tsx +++ b/src/client/lazy-app/Compress/Options/index.tsx @@ -17,7 +17,7 @@ import Toggle from './Toggle'; import Select from './Select'; import { Options as QuantOptionsComponent } from 'features/processors/quantize/client'; import { Options as ResizeOptionsComponent } from 'features/processors/resize/client'; -import { CLIIcon } from 'client/lazy-app/icons'; +import { CLIIcon, SwapIcon } from 'client/lazy-app/icons'; interface Props { index: 0 | 1; @@ -28,6 +28,7 @@ interface Props { onEncoderTypeChange(index: 0 | 1, newType: OutputType): void; onEncoderOptionsChange(index: 0 | 1, newOptions: EncoderOptions): void; onProcessorOptionsChange(index: 0 | 1, newOptions: ProcessorState): void; + onCopyToOtherSideClick(index: 0 | 1): void; onCopyCliClick(index: 0 | 1): void; } @@ -111,6 +112,10 @@ export default class Options extends Component { this.props.onCopyCliClick(this.props.index); }; + private onCopyToOtherSideClick = () => { + this.props.onCopyToOtherSideClick(this.props.index); + }; + render( { source, encoderState, processorState }: Props, { supportedEncoderMap }: State, @@ -140,6 +145,13 @@ export default class Options extends Component { > +