import { h, Component } from 'preact'; import * as style from './style.css'; import 'add-css:./style.css'; import RangeInputElement from './custom-els/RangeInput'; import './custom-els/RangeInput'; import { linkRef } from 'shared/initial-app/util'; interface Props extends preact.JSX.HTMLAttributes {} interface State {} export default class Range extends Component { rangeWc?: RangeInputElement; private onTextInput = (event: Event) => { const input = event.target as HTMLInputElement; const value = input.value.trim(); if (!value) return; this.rangeWc!.value = input.value; this.rangeWc!.dispatchEvent( new InputEvent('input', { bubbles: event.bubbles, }), ); }; render(props: Props) { const { children, ...otherProps } = props; const { value, min, max, step } = props; return ( ); } }