🔧 Tweak values on the slider

This commit is contained in:
ajnart
2022-06-14 22:09:30 +02:00
parent bd920dfc86
commit 4981823c37

View File

@@ -6,12 +6,12 @@ export function AppCardWidthSelector() {
const { config, setConfig } = useConfig(); const { config, setConfig } = useConfig();
const MARKS = [ const MARKS = [
{ value: 1, label: '1' }, { value: 0.8 },
{ value: 2, label: '2' }, { value: 1 },
{ value: 3, label: '3' }, { value: 1.2 },
{ value: 4, label: '4' }, { value: 1.4 },
{ value: 6, label: '6' }, { value: 1.6 },
{ value: 12, label: '12' }, { value: 2 },
]; ];
const setappCardWidth = (appCardWidth: number) => { const setappCardWidth = (appCardWidth: number) => {
@@ -28,10 +28,11 @@ export function AppCardWidthSelector() {
<Group direction="column" spacing="xs" grow> <Group direction="column" spacing="xs" grow>
<Text>App Width</Text> <Text>App Width</Text>
<Slider <Slider
defaultValue={config.settings.appCardWidth || 6} label={null}
step={1} defaultValue={config.settings.appCardWidth}
min={1} step={0.2}
max={12} min={0.8}
max={2}
marks={MARKS} marks={MARKS}
styles={{ markLabel: { fontSize: 'xx-small' } }} styles={{ markLabel: { fontSize: 'xx-small' } }}
onChange={(value) => setappCardWidth(value)} onChange={(value) => setappCardWidth(value)}