|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- # Tesseract Web - React
-
- Front-end components for Web using the [Tesseract design system](https://make.modal.sh/design), written for [React](https://reactjs.org).
-
- [![package: @tesseract-design/react](https://img.shields.io/badge/package-%40tesseract--design%2Freact-C78AB3?style=flat-square&labelColor=666666)](https://pack.modal.sh/js/@tesseract-design/react)
- [![jest: 25.1.0](https://img.shields.io/badge/jest-25.1.0-C21325?style=flat-square&labelColor=666666&logo=Jest&logoColor=ffffff)](https://github.com/facebook/jest)
- [![react: 16.13.1](https://img.shields.io/badge/react-16.13.1-61DAFB?style=flat-square&labelColor=666666&logo=React&logoColor=ffffff)](https://github.com/facebook/react)
- [![styled-components: 5.1.0](https://img.shields.io/badge/styled--components-5.1.0-DB7093?style=flat-square&labelColor=666666&logo=styled-components&logoColor=ffffff)](https://github.com/styled-components/styled-components)
-
- ## Installation
-
- Since this package resides in the [Modal.sh JavaScript Package Registry](https://pack.modal.sh/js/), you may need to
- adjust configuration in your chosen package manager.
-
- With [Yarn](https://yarnpkg.com), add this to your `.yarnrc` file:
-
- ```
- "@tesseract-design:registry" "https://pack.modal.sh/js/"
- ```
-
- Then, install the package by running the following command:
-
- ```shell script
- yarn add @tesseract-design/react
- ```
-
- ## Usage
-
- The package includes components as named exports. Simply import the components you need individually or use a namespace
- import, like so:
-
- ```jsx harmony
- import * as React from 'react'
- import ReactDOM from 'react-dom'
- import * as T from '@tesseract-design/react'
-
- const LoginForm = etcProps => (
- <form
- {...etcProps}
- >
- <fieldset>
- <legend>
- Log In
- </legend>
- <div>
- <T.TextInput
- block
- label="Username"
- />
- </div>
- <div>
- <T.TextInput
- block
- type="password"
- label="Password"
- />
- </div>
- <div>
- <T.Button>
- Log In
- </T.Button>
- </div>
- </fieldset>
- </form>
- )
-
- const mountNode = window.document.createElement('div')
-
- ReactDOM.render(
- <LoginForm />,
- mountNode,
- )
-
- window.document.body.appendChild(mountNode)
- ```
|