forked from lightningpixel/modly
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAccessibilitySection.tsx
More file actions
42 lines (37 loc) · 1.48 KB
/
Copy pathAccessibilitySection.tsx
File metadata and controls
42 lines (37 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
import { useAppStore } from '@shared/stores/appStore'
import { Section, Card, Row, Toggle, SegmentedControl } from '@shared/ui'
export function AccessibilitySection(): JSX.Element {
const { useAtkinsonFont, setUseAtkinsonFont, uiScale, setUiScale } = useAppStore()
return (
<Section title="Accessibility" subtitle="Make Modly easier to read and use.">
<div className="grid grid-cols-2 gap-4">
<Card title="Display Font" description="Use a more legible typeface, helpful for dyslexia and low vision.">
<Row
label="Atkinson Hyperlegible"
description="Replace the default font with a typeface designed for readability."
>
<Toggle value={useAtkinsonFont} onChange={setUseAtkinsonFont} />
</Row>
</Card>
<Card title="Interface Scale" description="Zoom the whole interface up or down.">
<Row
label="Scale"
description="Applies to all text, icons, and spacing."
>
<SegmentedControl
ariaLabel="Interface scale"
value={uiScale}
onChange={setUiScale}
options={[
{ value: 'small', label: 'Small' },
{ value: 'medium', label: 'Medium' },
{ value: 'large', label: 'Large' },
{ value: 'very-large', label: 'Very Large' },
]}
/>
</Row>
</Card>
</div>
</Section>
)
}