How to use react-native-bpk-styles - 3 common examples

To help you get started, we’ve selected a few react-native-bpk-styles examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Skyscanner / backpack / native / packages / react-native-bpk-component-card / src / BpkCard.ios.js View on Github external
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,
github Skyscanner / backpack / native / packages / react-native-bpk-component-card / src / BpkCard.ios.js View on Github external
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,
    cornerStyle,
    focused,
    padded,
    style: userStyle,
    innerStyle: userInnerStyle,
    ...rest
  } = props;
github Skyscanner / backpack / native / packages / react-native-bpk-component-chip / src / BpkChipWrapper.js View on Github external
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: {

react-native-bpk-styles

Backpack React Native common styles.

Apache-2.0
Latest version published 4 years ago

Package Health Score

70 / 100
Full package analysis

Similar packages