bpk-theming

3.1.2 • Public • Published

bpk-theming

Backpack theming utilities.

Installation

npm install bpk-theming --save-dev

Usage

import BpkThemeProvider from 'bpk-theming';

import BpkLink, { themeAttributes as linkThemeAttributes } from 'bpk-component-link';

const theme = {
  linkColor: '#c00',
  linkHoverColor: '#d00',
  linkActiveColor: '#a00',
  linkVisitedColor: '#800',
};

export default class App extends Component {
  render() {
    return (
      <BpkThemeProvider theme={theme} themeAttributes={[...linkThemeAttributes]}>
        <BpkLink onClick={() => {}}>Book flight</BpkLink>
      </BpkThemeProvider>
    );
  }
}

Props

Property PropType Required Default Value
children node true -
themeAttributes arrayOf(string) true -
component elementType false div
theme object false null

Readme

Keywords

none

Package Sidebar

Install

npm i bpk-theming

Weekly Downloads

8

Version

3.1.2

License

Apache-2.0

Unpacked Size

27.1 kB

Total Files

8

Last publish

Collaborators

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