@themeables/text
TypeScript icon, indicating that this package has built-in type declarations

4.1.0 • Public • Published

@themeables/text

What is a themeable? You can find more in the @themeables readme

Properties that the theme function for the @themeables/text should return:

type TThemeableText = {
  color?: TColor,
  fontFamily?: string,
  fontWeight?: TStyle['fontWeight'],
  fontSize?: number,
  lineHeight?: number,
  letterSpacing?: number,
  isUnderlined?: boolean,
}

On top of that, the themeable text component receives these props:

import { TStyle } from 'stili'

type TText = {
  id?: string,
  color?: TColor,
  fontFamily?: string,
  fontWeight?: TStyle['fontWeight'],
  fontSize?: number,
  lineHeight?: number,
  letterSpacing?: number,
  isUnderlined?: boolean,
  shouldPreserveWhitespace?: boolean,
  shouldPreventWrap?: boolean,
  shouldPreventSelection?: boolean,
  shouldHideOverflow?: boolean,
  children: ReactNode,
}

You can see a full example usage in the meta file

Readme

Keywords

none

Package Sidebar

Install

npm i @themeables/text

Weekly Downloads

15

Version

4.1.0

License

MIT

Unpacked Size

5.66 kB

Total Files

9

Last publish

Collaborators

  • julia.spehrer
  • ijigg
  • gideon.gur
  • irminakacz
  • atilaz
  • case.taintor
  • moria.am