Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const SectorInfo = (props: Props) => {
if (props.data == null) {
return null;
}
return (
<>
);
};
render() {
const { onPress, disabled, style } = this.props;
return (
);
}
}
render() {
const { onPress, disabled, style } = this.props;
return (
);
}
}
const prefix = React.Children.map(children, child => {
if (React.isValidElement(child)) {
let iconColor = defaultTokens.colorIconInput;
if (Platform.OS !== 'web') {
if (status === 'warning') {
iconColor = defaultTokens.colorIconCritical;
} else if (status === 'success') {
iconColor = defaultTokens.colorIconSuccess;
} else iconColor = defaultTokens.colorIconSecondary;
}
return React.cloneElement(child, {
color: iconColor,
size,
});
}
return child;
});
export default function TripInput({
style,
icon,
label,
value,
placeholder,
onPress,
}: Props) {
const inputIcon = React.cloneElement(icon, {
color: defaultTokens.colorIconSecondary,
});
const hasValue = value.length > 0;
return (
const ClearButton = ({ onPress, focused, value }) => {
if (focused && value) {
return (
);
}
return null;
};
export default function PassengersButton({ onPress, adults, infants }: Props) {
return (
);
}
onDecrement,
number,
showNumber = true,
numberStyle,
min,
max,
disableDecrement: originalDisableDecrement,
disableIncrement: originalDisableIncrement,
}: Props) {
const belowMin = min != null && number <= min;
const aboveMax = max != null && number >= max;
const disableDecrement = belowMin ?? originalDisableDecrement;
const disableIncrement = aboveMax ?? originalDisableIncrement;
const iconProps = {
color: defaultTokens.colorIconSecondary,
size: 'small',
};
let numberDisplayed = number;
if (belowMin) {
numberDisplayed = min;
}
if (aboveMax) {
numberDisplayed = max;
}
return (
function SectorInfoReturn(props: Props) {
return (
<>
);
}
render() {
const { onPress, icon, label } = this.props;
return (
);
}
}