TheoryOfNekomata 9971797b27 | pirms 3 gadiem | |
---|---|---|
packages | pirms 3 gadiem | |
plop/templates | pirms 4 gadiem | |
utilities | pirms 4 gadiem | |
.editorconfig | pirms 4 gadiem | |
.env.example | pirms 4 gadiem | |
.gitignore | pirms 3 gadiem | |
.npmignore | pirms 3 gadiem | |
.prettierrc | pirms 4 gadiem | |
LICENSE | pirms 4 gadiem | |
README.md | pirms 3 gadiem | |
global.d.ts | pirms 4 gadiem | |
jest.config.js | pirms 4 gadiem | |
jest.setup.ts | pirms 4 gadiem | |
package.json | pirms 3 gadiem | |
plopfile.js | pirms 4 gadiem | |
rollup.config.js | pirms 4 gadiem | |
tsconfig.json | pirms 3 gadiem | |
yarn.lock | pirms 3 gadiem |
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.