import { useState } from 'react';
import style from './dev.module.css';
import { Meter } from '.';
export default {
component: Meter,
title: 'Meter dev',
};
export const CustomStyle = () => (
<>
>
);
export const Default = () => (
<>
>
);
export const Optimum = () => {
const [high, setHigh] = useState(66);
const [low, setLow] = useState(33);
const [optimum, setOptimum] = useState(50);
const [value, setValue] = useState(0);
return (
<>
Low:
setLow(parseInt(e.target.value, 10)) }
value={ low } />
High:
setHigh(parseInt(e.target.value, 10)) }
value={ high } />
Optimum:
setOptimum(parseInt(e.target.value, 10)) }
value={ optimum } />
Value: { value }
setValue(parseInt(e.target.value, 10)) }
type="range" />
>
);
};
export const Thresholds = () => {
const [high, setHigh] = useState(66);
const [low, setLow] = useState(33);
const [value, setValue] = useState(0);
return (
<>
Low:
setLow(parseInt(e.target.value, 10)) }
value={ low } />
High:
setHigh(parseInt(e.target.value, 10)) }
value={ high } />
Value: { value }
setValue(parseInt(e.target.value, 10)) }
type="range" />
>
);
};