Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

💡 [REQUEST] - Add storybook #46

Open
MSzalowski opened this issue Sep 5, 2023 · 0 comments
Open

💡 [REQUEST] - Add storybook #46

MSzalowski opened this issue Sep 5, 2023 · 0 comments
Labels
question Further information is requested

Comments

@MSzalowski
Copy link

Start Date

No response

Implementation PR

No response

Reference Issues

#41

Summary

As documentation describes:
Storybook is a frontend workshop for building UI components and pages in isolation. Thousands of teams use it for UI development, testing, and documentation. It’s open source and free.

Basic Example

From documentation:

// Button.stories.ts|tsx

import type { Meta, StoryObj } from '@storybook/react';

import { Button } from './Button';

const meta: Meta<typeof Button> = {
  component: Button,
};

export default meta;
type Story = StoryObj<typeof Button>;

/*
 *👇 Render functions are a framework specific feature to allow you control on how the component renders.
 * See https://storybook.js.org/docs/react/api/csf
 * to learn how to use render functions.
 */
export const Primary: Story = {
  render: () => <Button primary label="Button" />,
};

Drawbacks

  • Additional layer of complexity.
  • Requires additional work on a new components

Unresolved questions

No response

@MSzalowski MSzalowski added the question Further information is requested label Sep 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant