Skip to content

Commit

Permalink
fix/flowType (#895)
Browse files Browse the repository at this point in the history
* fix: lint error

* fix: flow error
  • Loading branch information
Naturalclar authored Oct 23, 2024
1 parent 26fc8e3 commit e75ebfa
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 3 additions & 1 deletion js/SegmentedControl.js
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ const SegmentedControl = ({
return (
<SegmentedControlTab
enabled={enabled}
testID={(testIDS?.length ?? 0) > index ? testIDS[index] : `${index}`}
testID={
(testIDS?.length ?? 0) > index ? testIDS[index] : `${index}`
}
selected={selectedIndex === index}
accessibilityHint={`${
index + 1
Expand Down
3 changes: 1 addition & 2 deletions js/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,9 +108,8 @@ export type SegmentedControlProps = $ReadOnly<{|
*/
tabStyle?: ViewStyle,


/**
* array testID to each segment button
*/
testIDS: $ReadOnlyArray<string | number | Object>,
testIDS: $ReadOnlyArray<string>,
|}>;

0 comments on commit e75ebfa

Please # to comment.