0.0.4 • Published 1 year ago
@universal-tennis/ui-shared v0.0.4
UI-Shared
This repo was created to help organize components across the UT ecosystem; following specific design rules:
Stack:
- React (18.2.0)
- TypeScript
- MUI
- Styled-Components (as part of MUI)
Design rules
Components following material and atomic design rules;
- Standard naming components; with primary/secondary/etc variations. Keeping variations minimal and purposeful.
Example:
<Button type="primary" />
<Button type="secondary" />
Buttons should be uniform across the platforms with minimal variants, not multiple buttons created for each pages.
Publishing the Repo
- First when creating a new component, make sure to add it to the
components.jsx
file. - Then Run
yarn run publish:npm
to build a optimized build for all the components, this is configured for TS. - In the
package.json
file, make sure to pump to the next minor version. - Finally
yarn run publish-package
to deploy this version to NPM.
It can now be accessed in another repo like this:
import {Button} from "@universal-tennis/ui-shared";
Available Scripts
npm start
using npm 16.14.0
Runs the storybook app in localhost. Open http://localhost:6006 to view storybook in your browser. The page will reload when you make changes. You may also see any lint errors in the console.