How to use the react-native-bpk-theming.withTheme function in react-native-bpk-theming

To help you get started, we’ve selected a few react-native-bpk-theming 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-navigation-bar / src / BpkNavigationBar.android.js View on Github external
{trailingButton &&
            React.cloneElement(trailingButton, {
              disabledTintColor,
              touchableColor,
              tintColor,
            })}
        
        {hasSubtitleView && (
          
        )}
      
    );
  }
}

export default withTheme(BpkNavigationBar);
github Skyscanner / backpack / native / packages / react-native-bpk-component-button-link / src / BpkButtonLink.android.js View on Github external
const propTypes = {
  ...commonPropTypes,
  borderlessBackground: PropTypes.bool,
  style: ViewPropTypes.style,
};

BpkButtonLink.propTypes = propTypes;

BpkButtonLink.defaultProps = {
  ...commonDefaultProps,
  borderlessBackground: true,
  style: null,
};

export default withTheme(BpkButtonLink);
github Skyscanner / backpack / native / packages / react-native-bpk-component-button-link / src / BpkButtonLink.ios.js View on Github external
);
};

BpkButtonLink.propTypes = {
  ...commonPropTypes,
  large: PropTypes.bool,
};

BpkButtonLink.defaultProps = {
  ...commonDefaultProps,
  large: false,
};

export default withTheme(BpkButtonLink);
github Skyscanner / backpack / native / packages / react-native-bpk-component-navigation-bar / src / BpkNavigationBar.ios.js View on Github external
{trailingButton &&
            React.cloneElement(trailingButton, {
              disabledTintColor,
              tintColor,
              leading: false,
            })}
        
        {hasSubtitleView && (
          
        )}
      
    );
  }
}

export default withTheme(BpkNavigationBar);
github Skyscanner / backpack / native / packages / react-native-bpk-component-horizontal-nav / src / BpkHorizontalNavItem.js View on Github external
theme: themePropType,
};

BpkHorizontalNavItem.propTypes = propTypes;

BpkHorizontalNavItem.defaultProps = {
  accessibilityLabel: null,
  disabled: false,
  selected: false,
  small: false,
  style: null,
  theme: null,
};

export { propTypes };
export default withTheme(BpkHorizontalNavItem);
github Skyscanner / backpack / native / packages / react-native-bpk-component-horizontal-nav / src / BpkHorizontalNavSelectedIndicator.js View on Github external
const propTypes = {
  theme: themePropType,
  xOffset: PropTypes.oneOfType([PropTypes.number, PropTypes.instanceOf(Object)])
    .isRequired,
  width: PropTypes.oneOfType([PropTypes.number, PropTypes.instanceOf(Object)])
    .isRequired,
};

BpkHorizontalNavSelectedIndicator.propTypes = propTypes;

BpkHorizontalNavSelectedIndicator.defaultProps = {
  theme: null,
};

export default withTheme(BpkHorizontalNavSelectedIndicator);
export { propTypes };
github Skyscanner / backpack / native / packages / react-native-bpk-component-switch / src / BpkSwitch.js View on Github external
);
};

const propTypes = {
  theme: makeThemePropType(REQUIRED_THEME_ATTRIBUTES),
  value: PropTypes.bool,
};

BpkSwitch.propTypes = propTypes;

BpkSwitch.defaultProps = {
  theme: null,
  value: false,
};

export default withTheme(BpkSwitch);
export { propTypes };
github Skyscanner / backpack / native / packages / react-native-bpk-component-button / src / BpkButton.android.js View on Github external
)}
        
      
    
  );
};

BpkButton.propTypes = {
  ...commonPropTypes,
};

BpkButton.defaultProps = {
  ...commonDefaultProps,
};

export default withTheme(BpkButton);
export { BUTTON_TYPES, ICON_ALIGNMENTS };
github Skyscanner / backpack / native / packages / react-native-bpk-component-button / src / BpkButton.ios.js View on Github external
);
};

BpkButton.propTypes = {
  ...commonPropTypes,
  large: PropTypes.bool,
};

BpkButton.defaultProps = {
  ...commonDefaultProps,
  large: false,
};

export default withTheme(BpkButton);
export { BUTTON_TYPES, ICON_ALIGNMENTS };
github Skyscanner / backpack / native / packages / react-native-bpk-component-spinner / src / BpkSpinner.js View on Github external
const propTypes = {
  small: PropTypes.bool,
  theme: makeThemePropType(REQUIRED_THEME_ATTRIBUTES),
  type: PropTypes.oneOf(Object.keys(SPINNER_TYPES)),
};

BpkSpinner.propTypes = propTypes;

BpkSpinner.defaultProps = {
  small: false,
  theme: null,
  type: 'primary',
};

export default withTheme(BpkSpinner);
export { propTypes, SPINNER_TYPES };

react-native-bpk-theming

Backpack React Native theming utlities.

Apache-2.0
Latest version published 5 years ago

Package Health Score

70 / 100
Full package analysis

Similar packages