kex-component-library v0.1.29
To deploy to Firebase, follow these steps:
Make sure you have Firebase CLI installed. If not, run
npm install -g firebase-tools
to install it globally.Open your terminal and navigate to the root directory of your project.
Run
firebase login
to authenticate with your Firebase account.Once you are logged in, run
yarn deploy
to build the Storybook static files and deploy them to Firebase.Firebase will provide you with a URL where you can access your deployed application.
That's it! Your project should now be deployed to Firebase using the firebase login
and yarn deploy
commands.
To structure and build stories in your project, you can follow these steps:
- Create a new directory called
stories
in the root directory of your project. - Inside the
stories
directory, create a new file for each component you want to create a story for. For example, if you have aButton
component, create a file calledButton.stories.js
. - In each story file, import the necessary dependencies and the component you want to create a story for. For example:
import React from "react";
import Button from "../components/Button";
export default {
title: "Components/Button",
component: Button,
};
- Define different variations of your component by creating different "stories" using the
add
function. For example:
export const Primary = () => <Button variant="primary">Primary Button</Button>;
export const Secondary = () => (
<Button variant="secondary">Secondary Button</Button>
);
export const Disabled = () => <Button disabled>Disabled Button</Button>;
Customize each story by passing different props to your component. This allows you to showcase different states or variations of your component.
To view your stories, run
yarn storybook
in your terminal. This will start the Storybook development server and open a browser window where you can navigate through your stories.
That's it! You have now learned how to structure and build stories for your components using Storybook.
To install this component library through npm, follow these steps:
- Open your terminal and navigate to the root directory of your project.
- Run the following command to install the component library:
npm install kex-component-library
- Wait for the installation to complete. This will download and install the component library and its dependencies into your project.
- Once the installation is finished, you can import and use the components from the library in your project.
That's it! You have now successfully installed the component library through npm.
10 months ago
10 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
11 months ago
12 months ago
12 months ago
12 months ago
12 months ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago