Add tabindex to Switch and SwitchTableField

This commit is contained in:
Justin Edmund 2023-06-17 19:11:33 -07:00
parent f0bfd0bbd9
commit c66d688936
2 changed files with 3 additions and 0 deletions

View file

@ -36,6 +36,7 @@ const Switch = (props: Props) => {
disabled={disabled}
required={required}
value={value}
tabIndex={props.tabIndex}
onCheckedChange={onCheckedChange}
>
<RadixSwitch.Thumb className={thumbClasses} />

View file

@ -10,6 +10,7 @@ interface Props {
description?: string
value?: boolean
className?: string
tabIndex?: number
imageAlt?: string
imageClass?: string
imageSrc?: string[]
@ -43,6 +44,7 @@ const SwitchTableField = (props: Props) => {
<Switch
name={props.name}
checked={value}
tabIndex={props.tabIndex}
onCheckedChange={onValueChange}
/>
</TableField>