[feature-136] fix some bugs + prepare models download + use color libs for font contrast

This commit is contained in:
MathieuG-P
2023-05-14 12:55:37 +02:00
parent 86efb9293b
commit eb9775c89f
20 changed files with 237 additions and 95 deletions
@@ -11,7 +11,7 @@ export function BsmCheckbox({className, checked, onChange, disabled} : Props) {
const [hovered, setHovered] = useState(false);
const checkedColor = useThemeColor("first-color");
const iconColor = getCorrectTextColor(checkedColor);
const iconColor = checkedColor && getCorrectTextColor(checkedColor);
const handleClick = () => {
if(disabled){ return; }
@@ -17,7 +17,7 @@ type Props = {
export function BsmRange({colorType = "first-color", values, onChange, onFinalChange, min, max, renderLabel, step = 1, colors} : Props) {
const color = useThemeColor(colorType);
const labelTextColor = getCorrectTextColor(color);
const labelTextColor = color && getCorrectTextColor(color);
return (
<Range