Skip to content

Commit f7cc92b

Browse files
committed
fix: update docs for types from rn package and adjust versions
1 parent 5cf63a3 commit f7cc92b

File tree

21 files changed

+34
-34
lines changed

21 files changed

+34
-34
lines changed

MANUAL_SETUP.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export default main;
7070
### .rnstorybook/preview.tsx
7171

7272
```ts
73-
import type { Preview } from '@storybook/react';
73+
import type { Preview } from '@storybook/react-native';
7474

7575
const preview: Preview = {
7676
parameters: {},
@@ -153,7 +153,7 @@ In the `main.ts` we created the path was set as `../components/\*_/_.stories.?(t
153153
Create a file called `Button.stories.tsx` in the components folder.
154154

155155
```tsx
156-
import type { Meta, StoryObj } from '@storybook/react';
156+
import type { Meta, StoryObj } from '@storybook/react-native';
157157
import { Button } from 'react-native';
158158

159159
const meta = {

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ https://www.youtube.com/watch?v=egBqrYg0AIg
194194
In storybook we use a syntax called CSF that looks like this:
195195

196196
```tsx
197-
import type { Meta, StoryObj } from '@storybook/react';
197+
import type { Meta, StoryObj } from '@storybook/react-native';
198198
import { MyButton } from './Button';
199199

200200
const meta = {
@@ -263,7 +263,7 @@ For global decorators and parameters, you can add them to `preview.tsx` inside y
263263

264264
```tsx
265265
// .rnstorybook/preview.tsx
266-
import type { Preview } from '@storybook/react';
266+
import type { Preview } from '@storybook/react-native';
267267
import { withBackgrounds } from '@storybook/addon-ondevice-backgrounds';
268268

269269
const preview: Preview = {

docs/docs/intro/addons/controls.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -291,7 +291,7 @@ export default {
291291
### Complete Story with Multiple Control Types
292292

293293
```typescript
294-
import type { Meta, StoryObj } from '@storybook/react';
294+
import type { Meta, StoryObj } from '@storybook/react-native';
295295
import { MyComponent } from './MyComponent';
296296

297297
const meta = {

docs/docs/intro/configuration/cli-configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export default main;
120120
Global decorators and parameters:
121121

122122
```typescript
123-
import { Preview } from '@storybook/react';
123+
import { Preview } from '@storybook/react-native';
124124

125125
const preview: Preview = {
126126
decorators: [

docs/docs/intro/configuration/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ export default main;
5959
The `preview.tsx` file configures the story rendering environment and global parameters.
6060

6161
```typescript
62-
import { Preview } from '@storybook/react';
62+
import { Preview } from '@storybook/react-native';
6363
import { View } from 'react-native';
6464
import { withBackgrounds } from '@storybook/addon-ondevice-backgrounds';
6565

docs/docs/intro/development-workflows.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ const styles = StyleSheet.create({
9393
9494
```typescript
9595
// components/TextInput/TextInput.stories.tsx
96-
import type { Meta, StoryObj } from '@storybook/react';
96+
import type { Meta, StoryObj } from '@storybook/react-native';
9797
import { TextInput } from './TextInput';
9898

9999
const meta = {

docs/docs/intro/getting-started/manual-setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ export default main;
5151
In `preview.tsx`, set up any decorators or parameters:
5252

5353
```tsx
54-
import type { Preview } from '@storybook/react';
54+
import type { Preview } from '@storybook/react-native';
5555

5656
const preview: Preview = {
5757
parameters: {},

docs/docs/intro/writing-stories.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ The default export metadata controls how Storybook lists your stories and provid
3131

3232
```tsx
3333
// Button.stories.tsx
34-
import type { Meta } from '@storybook/react';
34+
import type { Meta } from '@storybook/react-native';
3535

3636
import { Button } from './Button';
3737

@@ -47,7 +47,7 @@ export default meta;
4747
Use the named exports of a CSF file to define your component’s stories. We recommend you use UpperCamelCase for your story exports. Here’s how to render Button in the “primary” state and export a story called Primary.
4848

4949
```tsx
50-
import type { Meta, StoryObj } from '@storybook/react';
50+
import type { Meta, StoryObj } from '@storybook/react-native';
5151

5252
import { Button } from './Button';
5353

@@ -72,7 +72,7 @@ A story is an object that describes how to render a component. You can have mult
7272

7373
```tsx
7474
// Button.stories.tsx
75-
import type { Meta, StoryObj } from '@storybook/react';
75+
import type { Meta, StoryObj } from '@storybook/react-native';
7676

7777
import { Button } from './Button';
7878

@@ -141,7 +141,7 @@ A simple example is adding padding to a component’s stories. Accomplish this u
141141

142142
```tsx
143143
// Button.stories.tsx
144-
import type { Meta, StoryObj } from '@storybook/react';
144+
import type { Meta, StoryObj } from '@storybook/react-native';
145145

146146
import { View } from 'react-native';
147147
import { Button } from './Button';

examples/expo-example/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,11 @@
3535
"@storybook/addon-ondevice-notes": "^10.0.0-rc.2",
3636
"@storybook/addon-react-native-server": "^1.0.0",
3737
"@storybook/global": "^5.0.0",
38-
"@storybook/react": "10.0.0",
38+
"@storybook/react": "^10.0.0",
3939
"@storybook/react-native": "^10.0.0-rc.2",
4040
"@storybook/react-native-theming": "^10.0.0-rc.2",
4141
"@storybook/react-native-ui-lite": "^10.0.0-rc.2",
42-
"@storybook/react-native-web-vite": "10.0.0",
42+
"@storybook/react-native-web-vite": "^10.0.0",
4343
"babel-plugin-react-compiler": "^19.1.0-rc.2",
4444
"expo": "^54.0.13",
4545
"expo-updates": "~29.0.12",
@@ -53,7 +53,7 @@
5353
"react-native-svg": "15.12.1",
5454
"react-native-web": "^0.21.0",
5555
"react-native-worklets": "^0.5.1",
56-
"storybook": "10.0.0",
56+
"storybook": "^10.0.0",
5757
"storybook-addon-deep-controls": "^0.9.5",
5858
"ws": "^8.18.0"
5959
},

packages/ondevice-actions/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@
3636
"peerDependencies": {
3737
"react": "*",
3838
"react-native": "*",
39-
"storybook": ">=10 || 10.0.0-rc.1 || ^10"
39+
"storybook": ">=10 || ^10"
4040
},
4141
"publishConfig": {
4242
"access": "public"

0 commit comments

Comments
 (0)