mirror of
https://github.com/GoogleChromeLabs/squoosh.git
synced 2025-11-16 10:39:53 +00:00
# Conflicts: # codecs/cpp.Dockerfile # codecs/imagequant/example.html # codecs/webp/dec/webp_dec.d.ts # codecs/webp/dec/webp_dec.js # codecs/webp/dec/webp_dec.wasm # codecs/webp/enc/webp_enc.d.ts # codecs/webp/enc/webp_enc.js # codecs/webp/enc/webp_enc.wasm # package-lock.json # package.json # src/codecs/tiny.webp # src_old/codecs/encoders.ts # src_old/codecs/processor-worker/tiny.avif # src_old/codecs/processor-worker/tiny.webp # src_old/codecs/tiny.webp # src_old/components/compress/index.tsx # src_old/lib/util.ts # src_old/sw/util.ts
22 lines
608 B
TypeScript
22 lines
608 B
TypeScript
import { h, Component } from 'preact';
|
|
import * as style from './style.scss';
|
|
import { UncheckedIcon, CheckedIcon } from '../../lib/icons';
|
|
|
|
interface Props extends JSX.HTMLAttributes {}
|
|
interface State {}
|
|
|
|
export default class Checkbox extends Component<Props, State> {
|
|
render(props: Props) {
|
|
return (
|
|
<div class={style.checkbox}>
|
|
{props.checked ? (
|
|
<CheckedIcon class={`${style.icon} ${style.checked}`} />
|
|
) : (
|
|
<UncheckedIcon class={style.icon} />
|
|
)}
|
|
<input class={style.realCheckbox} type="checkbox" {...props} />
|
|
</div>
|
|
);
|
|
}
|
|
}
|