forked from QuantumNous/new-api
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig-drawer.tsx
More file actions
745 lines (718 loc) · 23.7 KB
/
Copy pathconfig-drawer.tsx
File metadata and controls
745 lines (718 loc) · 23.7 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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
/*
Copyright (C) 2023-2026 QuantumNous
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as
published by the Free Software Foundation, either version 3 of the
License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
For commercial licensing, please contact support@quantumnous.com
*/
import { Radio as RadioPrimitive } from '@base-ui/react/radio'
import { RadioGroup as Radio } from '@base-ui/react/radio-group'
import { CircleCheck, Palette, RotateCcw } from 'lucide-react'
import type { SVGProps } from 'react'
import { useTranslation } from 'react-i18next'
import { IconDir } from '@/assets/custom/icon-dir'
import { IconLayoutCompact } from '@/assets/custom/icon-layout-compact'
import { IconLayoutDefault } from '@/assets/custom/icon-layout-default'
import { IconLayoutFull } from '@/assets/custom/icon-layout-full'
import { IconSidebarFloating } from '@/assets/custom/icon-sidebar-floating'
import { IconSidebarInset } from '@/assets/custom/icon-sidebar-inset'
import { IconSidebarSidebar } from '@/assets/custom/icon-sidebar-sidebar'
import { IconThemeDark } from '@/assets/custom/icon-theme-dark'
import { IconThemeLight } from '@/assets/custom/icon-theme-light'
import { IconThemeSystem } from '@/assets/custom/icon-theme-system'
import {
sideDrawerContentClassName,
sideDrawerFooterClassName,
sideDrawerFormClassName,
sideDrawerHeaderClassName,
} from '@/components/drawer-layout'
import { Button } from '@/components/ui/button'
import {
Sheet,
SheetContent,
SheetDescription,
SheetFooter,
SheetHeader,
SheetTitle,
SheetTrigger,
} from '@/components/ui/sheet'
import { useDirection } from '@/context/direction-provider'
import { type Collapsible, useLayout } from '@/context/layout-provider'
import { useThemeCustomization } from '@/context/theme-customization-provider'
import { useTheme } from '@/context/theme-provider'
import {
type ContentLayout,
THEME_PRESETS,
type ThemeFont,
type ThemePreset,
type ThemeRadius,
type ThemeScale,
} from '@/lib/theme-customization'
import { cn } from '@/lib/utils'
import { useSidebar } from './ui/sidebar'
const Item = RadioPrimitive.Root
export function ConfigDrawer() {
const { t } = useTranslation()
const { setOpen } = useSidebar()
const { resetDir } = useDirection()
const { resetTheme } = useTheme()
const { resetLayout } = useLayout()
const { resetCustomization } = useThemeCustomization()
const handleReset = () => {
setOpen(true)
resetDir()
resetTheme()
resetLayout()
resetCustomization()
}
return (
<Sheet>
<SheetTrigger
render={
<Button
size='icon'
variant='ghost'
aria-label={t('Open theme settings')}
aria-describedby='config-drawer-description'
className='max-md:hidden'
/>
}
>
<Palette className='size-[1.2rem]' aria-hidden='true' />
</SheetTrigger>
<SheetContent className={sideDrawerContentClassName('sm:max-w-md')}>
<SheetHeader className={sideDrawerHeaderClassName()}>
<SheetTitle>{t('Theme Settings')}</SheetTitle>
<SheetDescription id='config-drawer-description'>
{t('Adjust the appearance and layout to suit your preferences.')}
</SheetDescription>
</SheetHeader>
<div className={sideDrawerFormClassName()}>
<ThemeConfig />
<PresetConfig />
<FontConfig />
<RadiusConfig />
<ScaleConfig />
<SidebarConfig />
<LayoutConfig />
<ContentLayoutConfig />
<DirConfig />
</div>
<SheetFooter className={sideDrawerFooterClassName('grid-cols-1')}>
<Button
variant='destructive'
onClick={handleReset}
aria-label={t('Reset all settings to default values')}
>
{t('Reset')}
</Button>
</SheetFooter>
</SheetContent>
</Sheet>
)
}
function SectionTitle(props: {
title: string
showReset?: boolean
onReset?: () => void
className?: string
}) {
return (
<div
className={cn(
'text-muted-foreground mb-2 flex items-center gap-2 text-sm font-semibold',
props.className
)}
>
{props.title}
{props.showReset && props.onReset && (
<Button
size='icon'
variant='secondary'
className='size-4'
onClick={props.onReset}
aria-label='Reset'
>
<RotateCcw className='size-3' aria-hidden='true' />
</Button>
)}
</div>
)
}
function RadioGroupItem(props: {
item: {
value: string
label: string
icon: (props: SVGProps<SVGSVGElement>) => React.ReactElement
}
isTheme?: boolean
}) {
const isTheme = props.isTheme ?? false
return (
<Item
value={props.item.value}
className={cn('group outline-none', 'transition duration-200 ease-in')}
aria-label={`Select ${props.item.label.toLowerCase()}`}
aria-describedby={`${props.item.value}-description`}
>
<div
className={cn(
'ring-border relative rounded-md ring-[1px]',
'group-data-checked:ring-primary group-data-checked:shadow-2xl',
'group-focus-visible:ring-2'
)}
role='img'
aria-hidden='false'
aria-label={`${props.item.label} option preview`}
>
<CircleCheck
className={cn(
'fill-primary size-6 stroke-white',
'group-data-unchecked:hidden',
'absolute top-0 right-0 translate-x-1/2 -translate-y-1/2'
)}
aria-hidden='true'
/>
<props.item.icon
className={cn(
!isTheme &&
'stroke-primary fill-primary group-data-unchecked:stroke-muted-foreground group-data-unchecked:fill-muted-foreground'
)}
aria-hidden='true'
/>
</div>
<div
className='mt-1 text-xs'
id={`${props.item.value}-description`}
aria-live='polite'
>
{props.item.label}
</div>
</Item>
)
}
function ThemeConfig() {
const { t } = useTranslation()
const { defaultTheme, theme, setTheme } = useTheme()
return (
<div>
<SectionTitle
title={t('Theme')}
showReset={theme !== defaultTheme}
onReset={() => setTheme(defaultTheme)}
/>
<Radio
value={theme}
onValueChange={setTheme}
className='grid w-full max-w-md grid-cols-3 gap-4'
aria-label={t('Select theme preference')}
aria-describedby='theme-description'
>
{[
{ value: 'system', label: t('System'), icon: IconThemeSystem },
{ value: 'light', label: t('Light'), icon: IconThemeLight },
{ value: 'dark', label: t('Dark'), icon: IconThemeDark },
].map((item) => (
<RadioGroupItem key={item.value} item={item} isTheme />
))}
</Radio>
<div id='theme-description' className='sr-only'>
{t('Choose between system preference, light mode, or dark mode')}
</div>
</div>
)
}
function PresetConfig() {
const { t } = useTranslation()
const { defaults, customization, setPreset } = useThemeCustomization()
return (
<div>
<SectionTitle
title={t('Color preset')}
showReset={customization.preset !== defaults.preset}
onReset={() => setPreset(defaults.preset)}
/>
<Radio
value={customization.preset}
onValueChange={(v) => setPreset(v as ThemePreset)}
className='grid w-full grid-cols-4 gap-3'
aria-label={t('Select color preset')}
>
{THEME_PRESETS.map((preset) => (
<Item
key={preset.value}
value={preset.value}
className='group flex flex-col items-stretch outline-none'
aria-label={t(`preset.${preset.value}`)}
>
<div
className={cn(
'ring-border relative h-12 rounded-md ring-[1px] transition',
'group-data-checked:ring-primary group-data-checked:shadow-md',
'group-focus-visible:ring-2',
'group-hover:ring-primary/60'
)}
>
<div
aria-hidden='true'
className='absolute inset-0 rounded-md'
style={{
background:
preset.value === 'default'
? 'linear-gradient(135deg, oklch(0.68 0.2 25) 0%, oklch(0.8 0.17 85) 25%, oklch(0.72 0.18 155) 50%, oklch(0.66 0.19 245) 75%, oklch(0.68 0.2 315) 100%)'
: `linear-gradient(135deg, ${preset.swatches[0]} 0%, ${preset.swatches[1] ?? preset.swatches[0]} 100%)`,
}}
/>
<CircleCheck
className={cn(
'fill-primary absolute top-0 right-0 z-10 size-5 translate-x-1/2 -translate-y-1/2 stroke-white',
'group-data-unchecked:hidden'
)}
aria-hidden='true'
/>
</div>
<div className='mt-1.5 truncate text-center text-xs'>
{t(`preset.${preset.value}`)}
</div>
</Item>
))}
</Radio>
</div>
)
}
/**
* Font options shown in the theme drawer.
*
* Each option renders a live "Aa" preview in the font it represents.
* `Auto` deliberately leaves `fontFamily` undefined so the preview inherits
* the currently active body font — that way the user sees what `Auto` will
* actually look like for the active preset (Anthropic → serif glyphs,
* everything else → sans glyphs) without us having to duplicate the
* preset-default mapping in the UI.
*/
const FONT_OPTIONS: {
value: ThemeFont
label: string
// CSS font-family applied to the "Aa" preview. `undefined` = inherit
// from the current theme (used by the `default` option).
preview?: string
}[] = [
{ value: 'default', label: 'Auto', preview: undefined },
{ value: 'sans', label: 'Sans', preview: 'var(--font-sans)' },
{ value: 'serif', label: 'Serif', preview: 'var(--font-serif)' },
]
function FontConfig() {
const { t } = useTranslation()
const { defaults, customization, setFont } = useThemeCustomization()
return (
<div>
<SectionTitle
title={t('Font')}
showReset={customization.font !== defaults.font}
onReset={() => setFont(defaults.font)}
/>
<Radio
value={customization.font}
onValueChange={(v) => setFont(v as ThemeFont)}
className='grid w-full grid-cols-3 gap-4'
aria-label={t('Select body font')}
>
{FONT_OPTIONS.map((option) => (
<Item
key={option.value}
value={option.value}
className='group flex flex-col items-stretch outline-none'
aria-label={
option.value === 'default' ? t('System default') : option.label
}
>
<div
className={cn(
'ring-border relative h-12 rounded-md ring-[1px] transition',
'group-data-checked:ring-primary group-data-checked:shadow-md',
'group-focus-visible:ring-2',
'group-hover:ring-primary/60'
)}
>
<CircleCheck
className={cn(
'fill-primary absolute top-0 right-0 z-10 size-5 translate-x-1/2 -translate-y-1/2 stroke-white',
'group-data-unchecked:hidden'
)}
aria-hidden='true'
/>
<span
aria-hidden='true'
className='text-foreground absolute inset-0 flex items-center justify-center text-lg leading-none font-medium'
style={
option.preview
? { fontFamily: option.preview }
: // `font: inherit` defers to the active theme so the
// "Auto" tile previews what the resolved font will be.
{ font: 'inherit', fontSize: '1.125rem' }
}
>
Aa
</span>
</div>
<div className='mt-1.5 text-center text-xs'>{option.label}</div>
</Item>
))}
</Radio>
</div>
)
}
const RADIUS_OPTIONS: {
value: ThemeRadius
label: string
// CSS border-radius value used to render the visual preview corner.
preview: string
}[] = [
{ value: 'default', label: 'Auto', preview: '1rem' },
{ value: 'none', label: '0', preview: '0' },
{ value: 'sm', label: '0.3', preview: '0.3rem' },
{ value: 'md', label: '0.5', preview: '0.5rem' },
{ value: 'lg', label: '0.75', preview: '0.75rem' },
{ value: 'xl', label: '1.0', preview: '1rem' },
]
function RadiusConfig() {
const { t } = useTranslation()
const { defaults, customization, setRadius } = useThemeCustomization()
return (
<div>
<SectionTitle
title={t('Border radius')}
showReset={customization.radius !== defaults.radius}
onReset={() => setRadius(defaults.radius)}
/>
<Radio
value={customization.radius}
onValueChange={(v) => setRadius(v as ThemeRadius)}
className='grid w-full grid-cols-6 gap-2'
aria-label={t('Select border radius')}
>
{RADIUS_OPTIONS.map((option) => (
<Item
key={option.value}
value={option.value}
className='group flex flex-col items-stretch outline-none'
aria-label={
option.value === 'default' ? t('System default') : option.label
}
>
<div
className={cn(
'ring-border relative h-12 rounded-md ring-[1px] transition',
'group-data-checked:ring-primary group-data-checked:shadow-md',
'group-focus-visible:ring-2',
'group-hover:ring-primary/60'
)}
>
<CircleCheck
className={cn(
'fill-primary absolute top-0 right-0 z-10 size-5 translate-x-1/2 -translate-y-1/2 stroke-white',
'group-data-unchecked:hidden'
)}
aria-hidden='true'
/>
<span
aria-hidden='true'
className='border-foreground/70 absolute top-2.5 left-2.5 size-3.5 border-t-[1.5px] border-l-[1.5px]'
style={{ borderTopLeftRadius: option.preview }}
/>
</div>
<div className='mt-1.5 text-center text-xs'>{option.label}</div>
</Item>
))}
</Radio>
</div>
)
}
/**
* Visual preview rows for the density preset. Each row's height represents
* the relative line-height density (compact = tight rows, comfortable = wide).
*/
function ScalePreview(props: { rows: number; rowGap: string }) {
return (
<div
aria-hidden='true'
className='absolute inset-2.5 flex flex-col justify-center'
style={{ gap: props.rowGap }}
>
{Array.from({ length: props.rows }, (_, index) => 85 - index * 10).map(
(width) => (
<span
key={width}
className='bg-foreground/60 block h-[2px] rounded-full'
style={{ width: `${width}%` }}
/>
)
)}
</div>
)
}
function ScaleConfig() {
const { t } = useTranslation()
const { defaults, customization, setScale } = useThemeCustomization()
const scaleOptions: {
value: ThemeScale
label: string
rows: number
rowGap: string
}[] = [
{ value: 'sm', label: t('Compact'), rows: 4, rowGap: '3px' },
{ value: 'default', label: t('Default'), rows: 3, rowGap: '6px' },
{ value: 'lg', label: t('Comfortable'), rows: 2, rowGap: '10px' },
{ value: 'xl', label: t('Super Large'), rows: 1, rowGap: '14px' },
]
return (
<div>
<SectionTitle
title={t('Density')}
showReset={customization.scale !== defaults.scale}
onReset={() => setScale(defaults.scale)}
/>
<Radio
value={customization.scale}
onValueChange={(v) => setScale(v as ThemeScale)}
className='grid w-full grid-cols-4 gap-3'
aria-label={t('Select interface density')}
>
{scaleOptions.map((option) => (
<Item
key={option.value}
value={option.value}
className='group flex flex-col items-stretch outline-none'
aria-label={option.label}
>
<div
className={cn(
'ring-border relative h-12 rounded-md ring-[1px] transition',
'group-data-checked:ring-primary group-data-checked:shadow-md',
'group-focus-visible:ring-2',
'group-hover:ring-primary/60'
)}
>
<CircleCheck
className={cn(
'fill-primary absolute top-0 right-0 z-10 size-5 translate-x-1/2 -translate-y-1/2 stroke-white',
'group-data-unchecked:hidden'
)}
aria-hidden='true'
/>
<ScalePreview rows={option.rows} rowGap={option.rowGap} />
</div>
<div className='mt-1.5 truncate text-center text-xs'>
{option.label}
</div>
</Item>
))}
</Radio>
</div>
)
}
function SidebarConfig() {
const { t } = useTranslation()
const { defaultVariant, variant, setVariant } = useLayout()
return (
<div className='max-md:hidden'>
<SectionTitle
title={t('Sidebar')}
showReset={defaultVariant !== variant}
onReset={() => setVariant(defaultVariant)}
/>
<Radio
value={variant}
onValueChange={setVariant}
className='grid w-full max-w-md grid-cols-3 gap-4'
aria-label={t('Select sidebar style')}
aria-describedby='sidebar-description'
>
{[
{ value: 'inset', label: t('Inset'), icon: IconSidebarInset },
{
value: 'floating',
label: t('Floating'),
icon: IconSidebarFloating,
},
{ value: 'sidebar', label: t('Sidebar'), icon: IconSidebarSidebar },
].map((item) => (
<RadioGroupItem key={item.value} item={item} />
))}
</Radio>
<div id='sidebar-description' className='sr-only'>
{t('Choose between inset, floating, or standard sidebar layout')}
</div>
</div>
)
}
function LayoutConfig() {
const { t } = useTranslation()
const { open, setOpen } = useSidebar()
const { defaultCollapsible, collapsible, setCollapsible } = useLayout()
const radioState = open ? 'default' : collapsible
return (
<div className='max-md:hidden'>
<SectionTitle
title={t('Layout')}
showReset={radioState !== 'default'}
onReset={() => {
setOpen(true)
setCollapsible(defaultCollapsible)
}}
/>
<Radio
value={radioState}
onValueChange={(v) => {
if (v === 'default') {
setOpen(true)
return
}
setOpen(false)
setCollapsible(v as Collapsible)
}}
className='grid w-full max-w-md grid-cols-3 gap-4'
aria-label={t('Select layout style')}
aria-describedby='layout-description'
>
{[
{ value: 'default', label: t('Default'), icon: IconLayoutDefault },
{ value: 'icon', label: t('Compact'), icon: IconLayoutCompact },
{
value: 'offcanvas',
label: t('Full layout'),
icon: IconLayoutFull,
},
].map((item) => (
<RadioGroupItem key={item.value} item={item} />
))}
</Radio>
<div id='layout-description' className='sr-only'>
{t(
'Choose between default expanded, compact icon-only, or full layout mode'
)}
</div>
</div>
)
}
function ContentLayoutConfig() {
const { t } = useTranslation()
const { defaults, customization, setContentLayout } = useThemeCustomization()
return (
<div className='max-md:hidden'>
<SectionTitle
title={t('Content width')}
showReset={customization.contentLayout !== defaults.contentLayout}
onReset={() => setContentLayout(defaults.contentLayout)}
/>
<Radio
value={customization.contentLayout}
onValueChange={(v) => setContentLayout(v as ContentLayout)}
className='grid w-full grid-cols-2 gap-4'
aria-label={t('Select content width')}
>
{[
{ value: 'full', label: t('Full width') },
{ value: 'centered', label: t('Centered') },
].map((option) => (
<Item
key={option.value}
value={option.value}
className='group flex flex-col items-stretch outline-none'
aria-label={option.label}
>
<div
className={cn(
'ring-border relative h-12 rounded-md ring-[1px] transition',
'group-data-checked:ring-primary group-data-checked:shadow-md',
'group-focus-visible:ring-2',
'group-hover:ring-primary/60'
)}
>
<CircleCheck
className={cn(
'fill-primary absolute top-0 right-0 z-10 size-5 translate-x-1/2 -translate-y-1/2 stroke-white',
'group-data-unchecked:hidden'
)}
aria-hidden='true'
/>
<ContentLayoutPreview centered={option.value === 'centered'} />
</div>
<div className='mt-1.5 truncate text-center text-xs'>
{option.label}
</div>
</Item>
))}
</Radio>
</div>
)
}
/**
* Mini "page" mock used as the visual preview for content-width options.
* `full` fills horizontally, `centered` clamps the body to a narrow column.
*/
function ContentLayoutPreview(props: { centered: boolean }) {
return (
<div aria-hidden='true' className='absolute inset-2 flex flex-col gap-1.5'>
<span className='bg-foreground/40 block h-1.5 w-full rounded-sm' />
<div
className={cn(
'flex flex-1 flex-col gap-1',
props.centered ? 'mx-auto w-1/2' : 'w-full'
)}
>
<span className='bg-foreground/60 block h-[2px] w-full rounded-full' />
<span className='bg-foreground/60 block h-[2px] w-3/4 rounded-full' />
</div>
</div>
)
}
function DirConfig() {
const { t } = useTranslation()
const { defaultDir, dir, setDir } = useDirection()
return (
<div>
<SectionTitle
title={t('Direction')}
showReset={defaultDir !== dir}
onReset={() => setDir(defaultDir)}
/>
<Radio
value={dir}
onValueChange={setDir}
className='grid w-full max-w-md grid-cols-3 gap-4'
aria-label={t('Select site direction')}
aria-describedby='direction-description'
>
{[
{
value: 'ltr',
label: t('Left to Right'),
icon: (props: SVGProps<SVGSVGElement>) => (
<IconDir dir='ltr' {...props} />
),
},
{
value: 'rtl',
label: t('Right to Left'),
icon: (props: SVGProps<SVGSVGElement>) => (
<IconDir dir='rtl' {...props} />
),
},
].map((item) => (
<RadioGroupItem key={item.value} item={item} />
))}
</Radio>
<div id='direction-description' className='sr-only'>
{t('Choose between left-to-right or right-to-left site direction')}
</div>
</div>
)
}