• Stars
    star
    141
  • Rank 259,971 (Top 6 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created almost 7 years ago
  • Updated almost 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Develop your react components with parcel - A simple Alternative to storybook Using parceljs

parcel-storybook

Develop your components with parcel - A simple Alternative to storybook Using parceljs.

  • Easy to use.
  • Built with react, react-router and react-fuzzy-picker
  • parceljs that's mean super fast πŸš€
  • Full customization πŸ‘Œ
  • Ctrl+p Everywhere.
  • Play with props

Parcel-Storybook in action

alt text

Getting Started

Clone parcel-storybook repository and install npm dependencies && start parcel dev server.

git clone https://github.com/yjose/parcel-storybook.git
cd parcel-storybook
yarn install
yarn start

Create A simple Story

import React from "react";

export default () => (
  <div>
    <h1>Simple Lorem Story </h1>
  </div>
);

Add your story in the index page /src/stories/index.js and export your stories as array like the following :

import React from "react";
import Button from "../components/Button";
import Story from "./Story";
import Centred from "../Utils/Centred";

const storyProps = { text: "Parcel Storybook" };
const buttonProps = {
  name: "My Button",
  style: {
    margin: "10px",
    height: "30px",
    color: "black",
    background: "blue"
  }
};

export default [
  {
    name: "Story",
    component: Centred(Story),
    props: storyProps // adding props
  },
  {
    name: "Button",
    component: Centred(Button),
    props: buttonProps
  },
  {
    name: "without Prop", // without props
    component: Centred(() => <button>Test without props</button>)
  }
];

Now open your browser http://localhost:1234 and start your work

Feedback

if you are using this starter and in your opinion it helpful to create a npm package for it. let's me know - A simple star is enough - ⚑️.

More Repositories

1

reactjs-popup

React Popup Component - Modals,Tooltips and Menusβ€Šβ€”β€Š All inΒ one
TypeScript
1,790
star
2

awesome-new

A list of `.new` domains to perform online actions in one quick action.
384
star
3

twitter-bot

Node js twitter bot to send auto welcome message for your new followers
JavaScript
261
star
4

elazizi.com

My Blog
Astro
24
star
5

reactjs-popup-burger-menu

reactjs-popup burger menu example
JavaScript
19
star
6

spotify-login-animation-with-react-navigation-v5

Spotify login animation with react navigation v5
JavaScript
18
star
7

react-query-auth-token-refresh

Demo code for React Query Auth Token Refresh Article
TypeScript
16
star
8

gatsby-theme-doc

Gatsby theme for your library documentation
JavaScript
11
star
9

react-native-course

React Native Practical Course
JavaScript
11
star
10

react-native-forms-tutorial

A complete React Native Forms Tutorial
TypeScript
10
star
11

story-router

A simple component that's take array of component and return a simple router
JavaScript
9
star
12

react-native-image-picker-example

Java
7
star
13

DEVC_Meetup_React_and_reactNative

JavaScript
5
star
14

Tasker

Tasker Application
TypeScript
4
star
15

react-code-quality-talk

improving react code quality with the right tools https://react-code-quality.elazizi.com/#0
JavaScript
3
star
16

ReactRabatDay1

JavaScript
3
star
17

markdown-docs-starter

A react starter to create docs website with markdown and embed examples
JavaScript
3
star
18

yjose

My Profile Description
2
star
19

my-twitter-bot

My own twitter bot
JavaScript
2
star
20

github-action-demo

1
star
21

react-zero-to-ninja-day2

react-zero-to-ninja-day2
JavaScript
1
star
22

create-react-modal-with-22-line-of-code

Created with CodeSandbox
HTML
1
star