mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-10 04:20:44 +02:00
feat: add ariaLabel prop to Switch component (#25230)
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
export let state = true;
|
||||
export let id = '';
|
||||
export let ariaLabelledbyId = '';
|
||||
export let ariaLabel = '';
|
||||
export let tooltip = false;
|
||||
|
||||
const i18n = getContext('i18n');
|
||||
@@ -27,7 +28,8 @@
|
||||
<Switch.Root
|
||||
bind:checked={state}
|
||||
{id}
|
||||
aria-labelledby={ariaLabelledbyId}
|
||||
aria-labelledby={ariaLabelledbyId || undefined}
|
||||
aria-label={ariaLabel || undefined}
|
||||
class="flex h-[1.125rem] min-h-[1.125rem] w-8 shrink-0 cursor-pointer items-center rounded-full px-1 mx-[1px] transition {($settings?.highContrastMode ??
|
||||
false)
|
||||
? 'focus:outline focus:outline-2 focus:outline-gray-800 focus:dark:outline-gray-200'
|
||||
|
||||
Reference in New Issue
Block a user