Skip to content

Commit

Permalink
fix: 🚨 Fixed prop type shadowStyle is invalid warning
Browse files Browse the repository at this point in the history
  • Loading branch information
Karthik-B-06 committed Aug 19, 2020
1 parent 830576b commit 2697e92
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/segmentedControl/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import {
Text,
TouchableOpacity,
ViewPropTypes,
ShadowPropTypesIOS,
} from "react-native";

const getSegmentedBackgroundColor = (theme, colorValueFromProps) => {
Expand Down Expand Up @@ -182,7 +181,16 @@ SegmentedControl.propTypes = {
textStyle: PropTypes.object,
isRTL: PropTypes.bool,
theme: PropTypes.oneOf(["LIGHT", "DARK"]),
shadowStyle: ShadowPropTypesIOS,
shadowStyle: PropTypes.shape({
shadowColor: PropTypes.string,
shadowOffset: PropTypes.shape({
width: PropTypes.number,
height: PropTypes.number,
}),
shadowOpacity: PropTypes.number,
shadowRadius: PropTypes.number,
elevation: PropTypes.number,
}),
};

SegmentedControl.defaultProps = {
Expand Down

0 comments on commit 2697e92

Please sign in to comment.