Options
All
  • Public
  • Public/Protected
  • All
Menu

Class ThemeFont

Provides a set of font style aliases that con turn a normal React Native <Text> component into a styled element. The aliases provide a common set of classes to use for the fonts, such as title, hero, heading, etc. The alias names are available under IThemeFont. The mixins can be though of as the equivalent of CSS classes.

example
Using the mixins ```ts import { TextStyle } from 'react-native'; import { Theme } from '@ef-carbon/react-native-style'; const theme = new Theme(); const title: TextStyle = { ...theme.font.title, }; const subTitle: TextStyle = { ...theme.font.subTitle, }; const primary: TextStyle = { ...theme.font.primary, }; const secondary: TextStyle = { ...theme.font.secondary, }; const accemt: TextStyle = { ...theme.font.accemt, }; ```

Hierarchy

Implements

Index

Constructors

constructor

  • new ThemeFont(__namedParameters: object): ThemeFont

Properties

accent

accent: Readonly<IStyles>

code

code: Readonly<IStyles>

family

family: Readonly<IFamily>

heading

heading: Readonly<IStyles>

hero

hero: Readonly<IStyles>

letterSpacing

letterSpacing: number

lineHeight

lineHeight: number

primary

primary: Readonly<IStyles>

quote

quote: Readonly<IStyles>

secondary

secondary: Readonly<IStyles>

section

section: Readonly<IStyles>

size

size: Readonly<ISize>

style

style: ISlope<IWeight<IFontStyle>>

subHeading

subHeading: Readonly<IStyles>

subHero

subHero: Readonly<IStyles>

subSection

subSection: Readonly<IStyles>

subTitle

subTitle: Readonly<IStyles>

tertiary

tertiary: Readonly<IStyles>

title

title: Readonly<IStyles>

weight

weight: Readonly<IWeight>