@telegraph/typography
TypeScript icon, indicating that this package has built-in type declarations

0.0.10 • Public • Published

Telegraph by Knock

npm version

@telegraph/typography

Heading & Text components that powers typography in telegraph

Installation Instructions

npm install @telegraph/typography

Add stylesheet

Pick one:

Via CSS (preferred):

@import "@telegraph/typography"

Via Javascript:

import "@telegraph/typography/style.css"

Then, include className="tgph" on the farthest parent element wrapping the telegraph components

Usage

<Heading/>

import { Heading } from "@telegraph/typography"

...

<Heading>Heading</Heading>
Props
Name Type Default Options
as string null "h1" "h2" "h3" "h4" "h5" "h6"
size string "2" "1" "2" "3" "4" "5" "6" "7" "8" "9"
color string "default" "default" "gray" "red" "beige" "blue" "green" "yellow" "purple" "accent" "disabled" "white"
align string null "left" "right" "center"

<Text/>

import { Text } from "@telegraph/typography"

...

<Text>Text</Text>
Props
Name Type Default Options
as string null "p" "span" "div" "label" "em" "strong" "b" "i" "pre" "code"
size string "2" "1" "2" "3" "4" "5" "6" "7" "8" "9"
color string "default" "default" "gray" "red" "beige" "blue" "green" "yellow" "purple" "accent" "disabled" "white"
align string null "left" "right" "center"
weight string regular "regular" "medium"

Readme

Keywords

none

Package Sidebar

Install

npm i @telegraph/typography

Weekly Downloads

50

Version

0.0.10

License

MIT

Unpacked Size

42.1 kB

Total Files

32

Last publish

Collaborators

  • cjbell
  • kylemcd