前端开发

writing-react-native-storybook-stories

storybookjs/react-native

Create and edit React Native Storybook stories using Component Story Format (CSF). Use when writing .stories.tsx files, adding stories to React Native components, configuring Storybook addons (controls, actions, backgrounds, notes), setting up argTypes, decorators, parameters, or working with portable stories for testing. Applies to any task involving @storybook/react-native story authoring.

  • 693 次安装
  • 1300 星标
  • 收录于

安装命令

npx skills add https://github.com/storybookjs/react-native --skill writing-react-native-storybook-stories

SKILL.md

React Native Storybook Stories

Write stories for React Native components using @storybook/react-native v10 and Component Story Format (CSF).

Quick Start

Minimal story file:

import type { Meta, StoryObj } from '@storybook/react-native';
import { MyComponent } from './MyComponent';

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

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