@storybook/react-native-web-vite 9.0.0-alpha.5 → 9.0.0-alpha.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@storybook/react-native-web-vite",
|
|
3
|
-
"version": "9.0.0-alpha.
|
|
3
|
+
"version": "9.0.0-alpha.7",
|
|
4
4
|
"description": "Develop react-native components an isolated web environment with hot reloading.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"storybook"
|
|
@@ -63,9 +63,9 @@
|
|
|
63
63
|
"@babel/preset-react": "^7.26.3",
|
|
64
64
|
"@bunchtogether/vite-plugin-flow": "^1.0.2",
|
|
65
65
|
"@joshwooding/vite-plugin-react-docgen-typescript": "0.5.0",
|
|
66
|
-
"@storybook/builder-vite": "9.0.0-alpha.
|
|
67
|
-
"@storybook/react": "9.0.0-alpha.
|
|
68
|
-
"@storybook/react-vite": "9.0.0-alpha.
|
|
66
|
+
"@storybook/builder-vite": "9.0.0-alpha.7",
|
|
67
|
+
"@storybook/react": "9.0.0-alpha.7",
|
|
68
|
+
"@storybook/react-vite": "9.0.0-alpha.7",
|
|
69
69
|
"@vitejs/plugin-react": "^4.3.2",
|
|
70
70
|
"vite-plugin-babel": "^1.3.0",
|
|
71
71
|
"vite-plugin-commonjs": "^0.10.4",
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"react-dom": "^16.8.0 || ^17.0.0 || ^18.0.0 || ^19.0.0-beta",
|
|
81
81
|
"react-native": ">=0.74.5",
|
|
82
82
|
"react-native-web": "^0.19.12",
|
|
83
|
-
"storybook": "^9.0.0-alpha.
|
|
83
|
+
"storybook": "^9.0.0-alpha.7",
|
|
84
84
|
"vite": "^5.0.0 || ^6.0.0"
|
|
85
85
|
},
|
|
86
86
|
"engines": {
|
|
@@ -13,10 +13,9 @@ export const Header = ({ user, onLogin, onLogout, onCreateAccount }) => (
|
|
|
13
13
|
<View style={styles.buttonContainer}>
|
|
14
14
|
{user ? (
|
|
15
15
|
<>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
</>
|
|
16
|
+
<Text>Welcome, </Text>
|
|
17
|
+
<Text style={styles.userName}>{user.name}!</Text>
|
|
18
|
+
|
|
20
19
|
<Button style={styles.button} size="small" onPress={onLogout} label="Log out" />
|
|
21
20
|
</>
|
|
22
21
|
) : (
|
package/template/cli/js/Page.jsx
CHANGED
|
@@ -42,15 +42,15 @@ export const Page = () => {
|
|
|
42
42
|
</Text>
|
|
43
43
|
|
|
44
44
|
<View>
|
|
45
|
-
<
|
|
45
|
+
<Text>
|
|
46
46
|
Use a higher-level connected component. Storybook helps you compose such data from the
|
|
47
47
|
"args" of child component stories
|
|
48
|
-
</
|
|
48
|
+
</Text>
|
|
49
49
|
|
|
50
|
-
<
|
|
50
|
+
<Text>
|
|
51
51
|
Assemble data in the page component from your services. You can mock these services out
|
|
52
52
|
using Storybook.
|
|
53
|
-
</
|
|
53
|
+
</Text>
|
|
54
54
|
</View>
|
|
55
55
|
|
|
56
56
|
<Text style={styles.p}>
|
|
@@ -3,7 +3,7 @@ import { StyleSheet, Text, View } from 'react-native';
|
|
|
3
3
|
import { Button } from './Button';
|
|
4
4
|
|
|
5
5
|
export type HeaderProps = {
|
|
6
|
-
user?: {};
|
|
6
|
+
user?: { name: string };
|
|
7
7
|
onLogin: () => void;
|
|
8
8
|
onLogout: () => void;
|
|
9
9
|
onCreateAccount: () => void;
|
|
@@ -18,10 +18,9 @@ export const Header = ({ user, onLogin, onLogout, onCreateAccount }: HeaderProps
|
|
|
18
18
|
<View style={styles.buttonContainer}>
|
|
19
19
|
{user ? (
|
|
20
20
|
<>
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
</>
|
|
21
|
+
<Text>Welcome, </Text>
|
|
22
|
+
<Text style={styles.userName}>{user.name}!</Text>
|
|
23
|
+
|
|
25
24
|
<Button style={styles.button} size="small" onPress={onLogout} label="Log out" />
|
|
26
25
|
</>
|
|
27
26
|
) : (
|
|
@@ -5,7 +5,7 @@ import { Linking, StyleSheet, Text, View } from 'react-native';
|
|
|
5
5
|
import { Header } from './Header';
|
|
6
6
|
|
|
7
7
|
export const Page = () => {
|
|
8
|
-
const [user, setUser] = useState();
|
|
8
|
+
const [user, setUser] = useState<{ name: string } | undefined>();
|
|
9
9
|
|
|
10
10
|
return (
|
|
11
11
|
<View>
|
|
@@ -39,14 +39,14 @@ export const Page = () => {
|
|
|
39
39
|
data in Storybook:
|
|
40
40
|
</Text>
|
|
41
41
|
<View>
|
|
42
|
-
<
|
|
42
|
+
<Text>
|
|
43
43
|
Use a higher-level connected component. Storybook helps you compose such data from the
|
|
44
44
|
"args" of child component stories
|
|
45
|
-
</
|
|
46
|
-
<
|
|
45
|
+
</Text>
|
|
46
|
+
<Text>
|
|
47
47
|
Assemble data in the page component from your services. You can mock these services out
|
|
48
48
|
using Storybook.
|
|
49
|
-
</
|
|
49
|
+
</Text>
|
|
50
50
|
</View>
|
|
51
51
|
<Text style={styles.p}>
|
|
52
52
|
Get a guided tutorial on component-driven development at{' '}
|