mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-12 00:37:19 +00:00
Hiding "edit" when "original image"
This commit is contained in:
@@ -142,6 +142,9 @@ export default class Options extends Component<Props, State> {
|
||||
|
||||
return (
|
||||
<div class={style.options}>
|
||||
<Expander>
|
||||
{encoderState.type === identity.type ? null :
|
||||
<div>
|
||||
<h2 class={style.optionsTitle}>Edit</h2>
|
||||
<label class={style.sectionEnabler}>
|
||||
<Checkbox
|
||||
@@ -177,6 +180,9 @@ export default class Options extends Component<Props, State> {
|
||||
/>
|
||||
: null}
|
||||
</Expander>
|
||||
</div>
|
||||
}
|
||||
</Expander>
|
||||
|
||||
<h2 class={style.optionsTitle}>Compress</h2>
|
||||
|
||||
@@ -193,7 +199,8 @@ export default class Options extends Component<Props, State> {
|
||||
}
|
||||
</section>
|
||||
|
||||
{EncoderOptionComponent &&
|
||||
<Expander>
|
||||
{EncoderOptionComponent ?
|
||||
<EncoderOptionComponent
|
||||
options={
|
||||
// Casting options, as encoderOptionsComponentMap[encodeData.type] ensures
|
||||
@@ -202,7 +209,8 @@ export default class Options extends Component<Props, State> {
|
||||
}
|
||||
onChange={onEncoderOptionsChange}
|
||||
/>
|
||||
}
|
||||
: null}
|
||||
</Expander>
|
||||
</div>
|
||||
|
||||
{/*
|
||||
|
||||
Reference in New Issue
Block a user