@twreporter/react-typescript-components
v0.1.0-beta.30
Published
React components using TypeScript and Tailwind CSS
Keywords
Readme
@twreporter/react-typescript-components
React components built with TypeScript and Tailwind CSS.
Roadmap
- [X] add storybook
- [ ] add test
Installation
yarn add @twreporter/react-typescript-components
# or
npm install @twreporter/react-typescript-componentsPeer Dependencies
Make sure your project has the following peer dependencies installed:
- react ^19.0.0
- react-dom ^19.0.0
- tailwindcss ^4.1.11
Usage
import { Title2 } from '@twreporter/react-typescript-components/lib/title-bar'
function App() {
return (
<Title2 title="Title" subtitle="Subtitle" />
)
}Development & Build
Storybook
Run storybook on localhost
yarn storybookBuild
yarn buildThe output files will be generated in the lib/ directory.
Build tool change: tsup → tsdown
We replaced tsup with tsdown for building this package due to intermittent memory crashes when generating type declarations with tsup (ERR_WORKER_OUT_OF_MEMORY). See: https://github.com/egoist/tsup/issues/920
What changed
- Components are built with tsdown (see
tsdown.config.ts). - Scripts:
yarn build:componentsruns tsdown.yarn buildcleans, builds components, then builds Tailwind CSS tolib/styles.css.
Impact
- No breaking changes for consumers: we still ship ESM and CJS outputs in
lib/with bundled.d.tsand sourcemaps. - For contributors: use
yarn buildoryarn build:components; tsup is no longer used.
License
MIT
