修正大部分的编译错误。
This commit is contained in:
@@ -8,12 +8,14 @@ import { LabeledPicker } from '../components/LabeledPicker';
|
||||
import { ScrollArea } from '../components/ScrollArea';
|
||||
import styles from './Mixer.module.css';
|
||||
|
||||
type ColorModes = 'hex' | 'rgb' | 'hsl' | 'lab' | 'oklch';
|
||||
|
||||
export function Mixer() {
|
||||
const { colorFn } = useColorFunction();
|
||||
const [basicColor, setBasicColor] = useState('000000');
|
||||
const [mixColor, setMixColor] = useState('000000');
|
||||
const [mixRatio, setMixRatio] = useState(0);
|
||||
const [mode, setMode] = useState<'hex' | 'rgb' | 'hsl' | 'lab' | 'oklch'>('hex');
|
||||
const [mode, setMode] = useState<ColorModes>('hex');
|
||||
const mixedColor = useMemo(() => {
|
||||
try {
|
||||
if (!colorFn) {
|
||||
@@ -68,7 +70,7 @@ export function Mixer() {
|
||||
{ label: 'OKLCH', value: 'oklch' },
|
||||
]}
|
||||
value={mode}
|
||||
onChange={setMode}
|
||||
onChange={(v) => setMode(v as ColorModes)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
Reference in New Issue
Block a user