@tacc/core-components
v0.0.2
Published
React component library for TACC applications.
Downloads
2
Readme
TACC Core-Components
The shared components for TACC WMA Workspace Portals & Websites
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-styles
yarn 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 tup-ui
Install Dependencies:
npm install --include=optional --workspace=libs/core-components
Start demo:
npx nx serve core-components
For more commands, see Commands.
Contributing
to Components
Minimum Viable Product
Create or Improve a common component in 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 nx test core-components
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 |
| ---------------------------------------- | ------------------ | -------------------------------------- |
| npx nx serve core-components
| start demo | Storybook |
| npx nx build core-components
| build components | Vite |
| npx nx build-storybook core-components
| build demo | Storybook |
| npx nx test core-components
| execute unit tests | Vitest |