This repository contains reusable React components for the Rocket Tutor application. The components are written in TypeScript and developed using Storybook.
npm install @rocket-tutor/rocket-tutor-componentssh
git clone https://github.com/Rocket-tutor/Rocket-Tutor-Components.git
cd rocket-tutor-components
`
Then, install the dependencies:
`sh
npm install
`
Running the Application
To start the Storybook server, run:
`sh
npm run storybook
`
This will start the Storybook server on http://localhost:6006.
Building the Application
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:
`sh
npm login
`
2- Build the application:
`sh
npm run build
`
This will create a production-ready build in the dist directory.
Deploying the Application
To deploy the application, run:
`sh
npm run deploy
`
Use the components in other React project
To use the components in other React project, run:
`sh
npm install @rocket-tutor/rocket-tutor-components
`
Then, import the components in your React project:
`sh
import { Button } from "@rocket-tutor/rocket-tutor-components";
.
.
.
const App = () => {
return ;
};
``