Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
: tintColor || colorWhite;
const iconStyle = [styles.icon, { color: tintColorFinal }];
const accessibilityTraits = ['button'];
if (disabled) {
accessibilityTraits.push('disabled');
}
return (
);
};
},
viewSuccess: {
backgroundColor: colorGreen500,
},
viewDestructive: {
backgroundColor: colorRed500,
},
viewLight: {
backgroundColor: colorGray50,
},
viewInverse: {
backgroundColor: colorWhite,
},
viewOutline: {
paddingHorizontal: spacingMd - borderSizeSm,
backgroundColor: setOpacity(colorWhite, 0.2),
},
textBase: {
color: colorGray700,
includeFontPadding: false,
},
textDestructive: {
color: colorWhite,
},
textOutline: {
color: colorWhite,
},
borderBase: {
borderTopLeftRadius: borderRadiusSm,
borderBottomLeftRadius: borderRadiusSm,
borderTopRightRadius: borderRadiusSm,
borderBottomRightRadius: borderRadiusSm,
colorGray900,
spacingSm,
spacingMd,
spacingLg,
} from 'bpk-tokens/tokens/base.react.native';
import TransitionGroup from '@skyscanner/react-native-transitiongroup';
import { StyleSheet, ViewPropTypes, type StyleObj } from 'react-native';
import BpkCarouselIndicatorDot, {
INDICATOR_SIZES,
} from './BpkCarouselIndicatorDot';
const styles = StyleSheet.create({
wrapper: {
alignItems: 'center',
backgroundColor: setOpacity(colorGray900, 0.3),
borderRadius: borderRadiusSm,
flexDirection: 'row',
height: spacingLg,
justifyContent: 'center',
paddingHorizontal: spacingSm + spacingMd,
paddingVertical: spacingMd,
width: spacingLg * 3,
},
});
const getIndicatorSlice = (pageCount, selectedIndex) => {
if (pageCount <= 5) {
return {
begin: 0,
end: pageCount,
};
import {
PICKER_MENU_PROP_TYPE,
PICKER_MENU_DEFAULT_PROPS,
type PickerMenuProps,
} from './common-types';
const MAX_ROWS_TO_DISPLAY = 6;
const styles = StyleSheet.create({
overlay: {
left: 0,
height: '100%',
position: 'absolute',
top: 0,
width: '100%',
backgroundColor: setOpacity(colorGray900, 0.8),
},
listWrapper: {
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'center',
padding: spacingBase,
width: '100%',
height: '100%',
},
list: {
backgroundColor: colorWhite,
borderRadius: borderRadiusSm,
elevation: 5,
},
});