Skip to content

Commit e35bc99

Browse files
committed
feat: added renderTile prop
1 parent 3df23f3 commit e35bc99

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/index.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@ import Animated, {
1414
} from 'react-native-reanimated';
1515
import { widthPercentageToDP } from 'react-native-responsive-screen';
1616

17+
export interface TileProps {
18+
/** Styles of the default tile */
19+
style: ViewStyle;
20+
/** The React Native Reanimated transform style with translateX */
21+
transform: ViewStyle['transform'];
22+
/** The full width of tile */
23+
width: number;
24+
}
25+
1726
interface SegmentedControlProps {
1827
/**
1928
* The Segments Text Array
@@ -72,6 +81,10 @@ interface SegmentedControlProps {
7281
* Badge Text Styles
7382
*/
7483
badgeTextStyle?: TextStyle;
84+
/**
85+
* Render a custom tile component
86+
*/
87+
renderTile?: (props: TileProps) => React.ReactNode;
7588
}
7689

7790
const defaultShadowStyle = {

0 commit comments

Comments
 (0)