binarapps / expo-ts-template

Template for expo apps with typescript support
12 stars 2 forks source link

πŸ’‘ [REQUEST] - Add storybook #46

Open MSzalowski opened 1 year ago

MSzalowski commented 1 year ago

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

Unresolved questions

No response