react-native-bpk-theming

2.0.1 • Public • Published

react-native-bpk-theming

Backpack React Native theming utilities.

Installation

npm install react-native-bpk-theming --save-dev

Usage

import { Component } from 'react';
import { View } from 'react-native';
import BpkThemeProvider from 'react-native-bpk-theming';
import BpkButton from 'react-native-bpk-component-button';
 
const theme = {
  buttonPrimaryGradientStartColor: '#fce134',
  buttonPrimaryGradientEndColor: '#f8c42d',
  buttonPrimaryTextColor: '#2d244c',
  buttonSecondaryBackgroundColor: '#fff',
  buttonSecondaryTextColor: '#2d244c',
  buttonSecondaryBorderColor: '#2d244c',
  buttonLinkTextColor: '#fce134',
};
 
export default class App extends Component {
  render() {
    return (
      <BpkThemeProvider theme={theme}>
        <BpkButton type="primary" title="Book flight" onPress={() => {}} />
        <BpkButton type="secondary" title="Book flight" onPress={() => {}} />
      </BpkThemeProvider>
    );
  }
}

Props

Property PropType Required Default Value
children node true -
theme object true -

Readme

Keywords

none

Package Sidebar

Install

npm i react-native-bpk-theming

Weekly Downloads

21

Version

2.0.1

License

Apache-2.0

Unpacked Size

46.1 kB

Total Files

19

Last publish

Collaborators

  • anambl
  • skyscanner-koalasquad
  • gert-jan.vercauteren
  • frugoman
  • marianeumayer-skyscanner
  • ojcurt