@tacc/core-components
v0.0.4
Published
React component library for TACC applications.
Downloads
16
Readme
TACC Core-Components
The shared components for TACC WMA Workspace Portals & Websites
Known Clients
Table of Contents
Related Repositories
- Core Styles, the shared UI pattern code for TACC WMA CMS Websites
Project Architecture
| directory | contents |
| --------- | ---------------------------- |
| src/lib | components, tests, stories |
Prerequisites
Getting Started
Install with any package manager e.g.
npm install @tacc/core-stylesyarn add @tacc/core-styles
Import component(s) e.g.
import { Button } from '@tacc/core-components';import { FormikInput, FormikTextarea, FormikCheck, } from '@tacc/core-components';Use component(s)…
Sorry. Examples are limited and incomplete:
Developing
The components are React components that should be written in TypeScript.
Setup
Enter the Repository Clone:
cd Core-ComponentsInstall Dependencies:
npm install --include=optionalStart demo:
npm start
For more commands, see Commands.
Contributing
Fix a Component
- Fix it.
- Update story (as relevant).
- Update tests (as relevant).
Add a Component
Minimum Viable Product
Create or Improve a common component from a TACC repository e.g.
- https://github.com/TACC/tup-ui
- https://github.com/TACC/Core-Portal
- https://github.com/TACC-Cloud/hazmapper
Put your work in a branch in this repository.
Open a Pull Request.
Complete Contribution
- Create a story to demo the component.
- Create unit tests.
in the Demo
| task | reference | | ------------------ | ------------------------------------------------- | | add/edit component | https://storybook.js.org/docs/writing-stories | | change interaction | https://storybook.js.org/docs/essentials/controls |
Testing
Unit Tests
Run npm test to execute the unit tests via Vitest.
End-to-End Tests
Perform manually by installing and testing the components in a separate respository. See different approaches to testing your own packages.
Resources
Commands
| command | task | service |
| ---------------------------------------- | ------------------ | -------------------------------------- |
| npm run start | start demo | Storybook |
| npm run build | build components | Vite |
| npm run test | execute unit tests | Vitest |
