Styles Module

Generally, hard coding styles values in a component should be avoided. Any values that are likely to be used across different UI components should be split into their own module.

// Styles module
export const white = '#fff';
export const black = '#111';
export const blue = '#07c';

export const colors = {
  white,
  black,
  blue
};

export const space = [
  0,
  8,
  16,
  32,
  64
];

const styles = {
  bold: 600,
  space,
  colors
};

export default styles

Usage

Last updated