Skip to content

Commit d76532e

Browse files
committed
revert Switch accessibilityState to use array
1 parent 78956d7 commit d76532e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/components/switch/index.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,11 @@ class Switch extends BaseComponent {
8383
getAccessibilityProps() {
8484
const {disabled, value} = this.getThemeProps();
8585

86+
8687
return {
8788
accessible: true,
8889
accessibilityRole: 'switch',
89-
accessibilityStates: {disabled, checked: value},
90+
accessibilityStates: disabled ? ['disabled'] : value ? ['checked'] : ['unchecked'],
9091
accessibilityValue: {text: value ? '1' : '0'}
9192
};
9293
}

0 commit comments

Comments
 (0)