Skip to content

Latest commit

 

History

History
118 lines (91 loc) · 6.64 KB

README.md

File metadata and controls

118 lines (91 loc) · 6.64 KB

Telegraph by Knock

Telegraph

The design system at Knock

Installation Instructions

npm install @telegraph/tokens

Add stylesheets

Pick one:

Via CSS (preferred):

@import "@telegraph/tokens"; (option: default.css, dark.css, light.css)

Via Javascript:

import "@telegraph/tokens/default.css"; (options: default.css, dark.css, light.css)

Scope styles:

<body className="tgph">

Note: If you only want to use telegraph in a certain part of your app, you would wrap that part in an element with the tgph class.

Developing Locally

Here is how to run the Storybook and development server locally:

  1. Clone the repository
git clone https://github.com/knocklabs/telegraph.git
  1. Install dependencies
yarn install
  1. Compile the packages and watch for changes
yarn dev:packages
  1. In another terminal tab, run the Storybook server
yarn dev:storybook
  1. Open http://localhost:3005 in your browser. You can now make changes to the code and see them refresh automatically.

Before committing changes

Before committing, run the following commands to ensure the code is formatted and linted:

yarn format
yarn lint

Releasing

We use changesets to manage releases. Each time a PR is opened, make sure to include a changeset. A changeset bot will add a comment to your PR prompting you to do so with a template, click that and commit it to your PR.

Packages

Core Packages

Name Version
@telegraph/appearance npm version
@telegraph/button npm version
@telegraph/combobox npm version
@telegraph/icon npm version
@telegraph/input npm version
@telegraph/layout npm version
@telegraph/menu npm version
@telegraph/modal npm version
@telegraph/popover npm version
@telegraph/radio npm version
@telegraph/segmented-control npm version
@telegraph/tag npm version
@telegraph/tokens npm version
@telegraph/tooltip npm version
@telegraph/typography npm version

Internal Packages

Name Version
@telegraph/compose-refs npm version
@telegraph/helpers npm version
@telegraph/postcss-config npm version
@telegraph/prettier-config npm version
@telegraph/style-engine npm version
@telegraph/vite-config npm version

Upcoming Packages

Name Status
@telegraph/color-picker Planned
@telegraph/data-list Planned
@telegraph/dialog Planned
@telegraph/divider Planned
@telegraph/form-control Planned
@telegraph/link Planned
@telegraph/spinner Planned
@telegraph/tab Planned
@telegraph/textarea Planned
@telegraph/toast Planned
@telegraph/toggle Planned