This repository contains reusable React components for the Rocket Tutor application. The components are written in TypeScript and developed using Storybook.
Please change the version before making a pull request!
- Node.js >= 18.0.0
- npm
Note: It's recommended to use npm for this project instead of yarn.
First, clone the repository:
git clone https://github.com/Rocket-tutor/Rocket-Tutor-Components.git
cd rocket-tutor-components
Then, install the dependencies:
npm install
To start the Storybook server, run:
npm run storybook
This will start the Storybook server on http://localhost:6006.
To build the application:
1- Make sure you have access to the Rocket Tutor NPM registry. If you don't have access, ask on Tech channel on Slack
After that, run:
npm login
2- Build the application:
npm run build
This will create a production-ready build in the dist directory.
To deploy the application, run:
npm run deploy
To use the components in other React project, run:
npm install @rocket-tutor/rocket-tutor-components
Then, import the components in your React project:
import { Button } from "@rocket-tutor/rocket-tutor-components";
.
.
.
const App = () => {
return <Button>Click Me</Button>;
};