Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface IThemeColourOptions

The options for the ThemeColour class. Allow the default colour aliases to be overridden.

Hierarchy

  • IThemeColourOptions

Index

Properties

Optional background

background: keyof IBaseColours | IColours<IBaseColour<IBackgroundStyle>>

An override from the base colour for the background colours. Can also be a fully formed ThemeColours class to completely customise the background colours.

example
Customising the colour base ```ts import { TextStyle } from 'react-native'; import { constants, Theme, ThemeColour } from '@ef-carbon/react-native-style'; const colour = ThemeColour({ constants, base: 'blue', background: 'red', }); const theme = new Theme({ colour }); ```

base

base: keyof IBaseColours

Determines the base colour of the colour aliases. This is the IColours colour alias to pull from for the secondary and accent colour aliases.

Optional border

border: keyof IBaseColours | IColours<IBaseColour<IBorderStyle>>

An override from the base colour for the border colours. Can also be a fully formed ThemeColours class to completely customise the border colours.

example
Customising the colour base ```ts import { TextStyle } from 'react-native'; import { constants, Theme, ThemeColour } from '@ef-carbon/react-native-style'; const colour = ThemeColour({ constants, base: 'blue', border: 'red', }); const theme = new Theme({ colour }); ```

constants

constants: Readonly<IConstants>

The Constants to pull colour swatches from

Optional font

font: keyof IBaseColours | IColours<IBaseColour<IFontStyle>>

An override from the base colour for the font colours. Can also be a fully formed ThemeColours class to completely customise the font colours.

example
Customising the colour base ```ts import { TextStyle } from 'react-native'; import { constants, Theme, ThemeColour } from '@ef-carbon/react-native-style'; const colour = ThemeColour({ constants, base: 'blue', font: 'red', }); const theme = new Theme({ colour }); ```