react-native-segmented-control icon indicating copy to clipboard operation
react-native-segmented-control copied to clipboard

feat: Segment accessibility

Open Gustash opened this issue 3 years ago • 0 comments

This PR is based on the conversation in #31.

Since no new PR was added, and that PR was not updated, this one finishes the implementation started in that PR.

Changes

  • Export SegmentedControlProps interface
  • Added Segment interface
  • Changed segments from an array of strings to a mixed array of strings and Segment objects
  • Transforming segments prop into an array of Segment objects and memoizing it. This keeps backwards compatibility by allowing a full array of strings to be passed
  • Setting default accessibility values in each segment Pressable
  • Overriding the default accessibility values by spreading the remaining Segment accessibility values for each segment, if defined

Gustash avatar May 05 '22 10:05 Gustash