Options
All
  • Public
  • Public/Protected
  • All
Menu

Class FontSize

Implements the IFontSize interface allowing a default set of divisions for the font size aliases. It takes a base and scale as defined by the Length class. The base provides the normal (500) value for the divisions. The scale is then used to calculate the divisions usingthe fontSizeRatio function.

example
Customising the normal font size ```ts import { FontSize, Scale } from '@ef-carbon/react-native-style'; const fontSize = new FontSize({ base: 20, scale: Scale.AugmentedFourth }); ```
example
Customising the divisions ```ts import { FontSize, fontSizeBase } from '@ef-carbon/react-native-style'; const fontSize = new FontSize({ base: { 500: fontSizeBase, 700: 30, }}); ```
see

Length

see

Scale

Hierarchy

Implements

Index

Constructors

constructor

  • new FontSize(__namedParameters?: object): FontSize

Accessors

100

  • get 100(): number

200

  • get 200(): number

300

  • get 300(): number

400

  • get 400(): number

500

  • get 500(): number

600

  • get 600(): number

700

  • get 700(): number

800

  • get 800(): number

900

  • get 900(): number

huge

  • get huge(): number

large

  • get large(): number

larger

  • get larger(): number

largest

  • get largest(): number

normal

  • get normal(): number

small

  • get small(): number

smaller

  • get smaller(): number

smallest

  • get smallest(): number

tiny

  • get tiny(): number

Methods

__@toPrimitive

  • __@toPrimitive(hint: "string" | "number" | "default"): number | string