Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
colorWhite,
borderRadiusSm,
borderRadiusLg,
spacingBase,
} from 'bpk-tokens/tokens/base.react.native';
import { shadows } from 'react-native-bpk-styles';
import React from 'react';
import PropTypes from 'prop-types';
import BpkTouchableOverlay from 'react-native-bpk-component-touchable-overlay';
import CORNER_STYLES, { defaultCornerStyle } from './BpkCardCornerStyles';
const styles = StyleSheet.create({
card: {
backgroundColor: colorWhite,
borderRadius: borderRadiusSm,
...shadows.base(),
},
cardCornerStyleLarge: {
borderRadius: borderRadiusLg,
},
cardPadded: {
padding: spacingBase,
},
cardFocused: shadows.large(),
cardInner: {
backgroundColor: 'transparent', // otherwise this view's corners would bleed outwith the outer container
},
});
const BpkCard = props => {
const {
children,
type Props as CommonProps,
commonPropTypes,
commonDefaultProps,
} from './common-types';
const styles = StyleSheet.create({
inner: {
alignItems: 'center',
backgroundColor: colorWhite,
borderRadius: borderRadiusPill,
flexDirection: 'row',
justifyContent: 'space-between',
paddingHorizontal: spacingBase,
paddingVertical: spacingMd,
...Platform.select({
ios: shadows.base(),
}),
},
innerSelected: {
backgroundColor: colorBlue500,
},
innerDisabled: {
backgroundColor: colorWhite,
},
text: {
color: colorGray700,
includeFontPadding: false,
},
textSelected: {
color: colorWhite,
},
textDisabled: {