TheoryOfNekomata 9971797b27 | 3 vuotta sitten | |
---|---|---|
packages | 3 vuotta sitten | |
plop/templates | 4 vuotta sitten | |
utilities | 4 vuotta sitten | |
.editorconfig | 4 vuotta sitten | |
.env.example | 4 vuotta sitten | |
.gitignore | 3 vuotta sitten | |
.npmignore | 3 vuotta sitten | |
.prettierrc | 4 vuotta sitten | |
LICENSE | 4 vuotta sitten | |
README.md | 3 vuotta sitten | |
global.d.ts | 4 vuotta sitten | |
jest.config.js | 4 vuotta sitten | |
jest.setup.ts | 4 vuotta sitten | |
package.json | 3 vuotta sitten | |
plopfile.js | 4 vuotta sitten | |
rollup.config.js | 4 vuotta sitten | |
tsconfig.json | 3 vuotta sitten | |
yarn.lock | 3 vuotta sitten |
Check the documentation for more details.
The package includes components as named exports. Simply import the components you need individually or use a namespace import, like so:
import * as React from 'react'
import ReactDOM from 'react-dom'
import * as T from '@tesseract-design/react-common'
const LoginForm = etcProps => (
<form
{...etcProps}
>
<fieldset>
<legend>
Log In
</legend>
<div>
<T.TextInput
name="username"
label="Username"
/>
</div>
<div>
<T.TextInput
name="password"
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)
The package is written and tested using TypeScript. Thus, typings for consumption in TypeScript are bundled with the compiled source.