mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-13 17:27:09 +00:00
OptPNG options
This commit is contained in:
@@ -2,6 +2,8 @@ import { h, Component } from 'preact';
|
|||||||
import { bind } from '../../lib/initial-util';
|
import { bind } from '../../lib/initial-util';
|
||||||
import { inputFieldValueAsNumber } from '../../lib/util';
|
import { inputFieldValueAsNumber } from '../../lib/util';
|
||||||
import { EncodeOptions } from './encoder-meta';
|
import { EncodeOptions } from './encoder-meta';
|
||||||
|
import Range from '../../components/range';
|
||||||
|
import * as style from '../../components/options/style.scss';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
options: EncodeOptions;
|
options: EncodeOptions;
|
||||||
@@ -21,19 +23,19 @@ export default class OptiPNGEncoderOptions extends Component<Props, {}> {
|
|||||||
|
|
||||||
render({ options }: Props) {
|
render({ options }: Props) {
|
||||||
return (
|
return (
|
||||||
<form>
|
<form class={style.optionsSection}>
|
||||||
<label>
|
<div class={style.optionOneCell}>
|
||||||
Effort:
|
<Range
|
||||||
<input
|
|
||||||
name="level"
|
name="level"
|
||||||
type="range"
|
|
||||||
min="0"
|
min="0"
|
||||||
max="7"
|
max="7"
|
||||||
step="1"
|
step="1"
|
||||||
value={'' + options.level}
|
value={options.level}
|
||||||
onChange={this.onChange}
|
onInput={this.onChange}
|
||||||
/>
|
>
|
||||||
</label>
|
Effort:
|
||||||
|
</Range>
|
||||||
|
</div>
|
||||||
</form>
|
</form>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
.range {
|
.range {
|
||||||
|
position: relative;
|
||||||
|
z-index: 0;
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-columns: 1fr auto;
|
grid-template-columns: 1fr auto;
|
||||||
}
|
}
|
||||||
@@ -8,6 +10,8 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.range-wc-container {
|
.range-wc-container {
|
||||||
|
position: relative;
|
||||||
|
z-index: 1;
|
||||||
grid-row: 2 / 3;
|
grid-row: 2 / 3;
|
||||||
grid-column: 1 / 3;
|
grid-column: 1 / 3;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user