mirror of
https://github.com/ajnart/homarr.git
synced 2025-11-11 16:05:47 +01:00
Slider option styling
This commit is contained in:
@@ -115,6 +115,7 @@ export const WidgetsEditModal = ({
|
|||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Widget switch
|
||||||
// Widget options are computed based on their type.
|
// Widget options are computed based on their type.
|
||||||
// here you can define new types for options (along with editing the widgets.d.ts file)
|
// here you can define new types for options (along with editing the widgets.d.ts file)
|
||||||
function WidgetOptionTypeSwitch(
|
function WidgetOptionTypeSwitch(
|
||||||
@@ -170,16 +171,19 @@ function WidgetOptionTypeSwitch(
|
|||||||
);
|
);
|
||||||
case 'slider':
|
case 'slider':
|
||||||
return (
|
return (
|
||||||
<Slider
|
<Stack spacing="xs">
|
||||||
color={primaryColor}
|
<Text>{t(`descriptor.settings.${key}.label`)}</Text>
|
||||||
key={`${option.type}-${index}`}
|
<Slider
|
||||||
label={t(`descriptor.settings.${key}.label`)}
|
color={primaryColor}
|
||||||
value={value as number}
|
key={`${option.type}-${index}`}
|
||||||
min={option.min}
|
label={t(`descriptor.settings.${key}.label`)}
|
||||||
max={option.max}
|
value={value as number}
|
||||||
step={option.step}
|
min={option.min}
|
||||||
onChange={(v) => handleChange(key, v)}
|
max={option.max}
|
||||||
/>
|
step={option.step}
|
||||||
|
onChange={(v) => handleChange(key, v)}
|
||||||
|
/>
|
||||||
|
</Stack>
|
||||||
);
|
);
|
||||||
default:
|
default:
|
||||||
return null;
|
return null;
|
||||||
|
|||||||
Reference in New Issue
Block a user