feat(ui): wip img2img ui

This commit is contained in:
psychedelicious
2023-04-24 20:34:24 +10:00
parent 568f0aad71
commit d40d5276dd
30 changed files with 453 additions and 100 deletions

View File

@@ -29,6 +29,7 @@ import { useTranslation } from 'react-i18next';
import { FocusEvent, memo, useEffect, useMemo, useState } from 'react';
import { BiReset } from 'react-icons/bi';
import IAIIconButton, { IAIIconButtonProps } from './IAIIconButton';
import { roundDownToMultiple } from 'common/util/roundDownToMultiple';
export type IAIFullSliderProps = {
label: string;
@@ -119,7 +120,9 @@ const IAISlider = (props: IAIFullSliderProps) => {
min,
numberInputMax
);
onChange(clamped);
const quantized = roundDownToMultiple(clamped, step);
onChange(quantized);
setLocalInputValue(quantized);
};
const handleInputChange = (v: number | string) => {