-
-
Notifications
You must be signed in to change notification settings - Fork 184
Expand file tree
/
Copy pathpreview.tsx
More file actions
57 lines (54 loc) 路 1.45 KB
/
Copy pathpreview.tsx
File metadata and controls
57 lines (54 loc) 路 1.45 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import { View, Appearance } from 'react-native';
import { withBackgrounds } from '@storybook/addon-ondevice-backgrounds';
import type { Preview } from '@storybook/react-native';
const preview: Preview = {
decorators: [
(Story) => (
<View style={{ padding: 8, flex: 1 }}>
<Story />
</View>
),
withBackgrounds,
],
parameters: {
actions: { argTypesRegex: '^on[A-Z].*' },
controls: {
matchers: {
color: /(background|color)$/i,
date: /Date$/,
},
},
options: {
storySort: {
method: 'alphabetical',
includeNames: true,
order: ['ControlExamples', ['ControlExample'], 'InteractionExample', 'DeepControls'],
},
},
hideFullScreenButton: false,
noSafeArea: false,
my_param: 'anything',
// backgrounds: {
// default: Appearance.getColorScheme() === 'dark' ? 'dark' : 'plain',
// values: [
// { name: 'plain', value: 'white' },
// { name: 'dark', value: '#333' },
// { name: 'app', value: '#eeeeee' },
// ],
// },
backgrounds: {
options: {
// 馃憞 Default options
dark: { name: 'Dark', value: '#333' },
light: { name: 'Light', value: '#F7F9F2' },
// 馃憞 Add your own
maroon: { name: 'Maroon', value: '#400' },
},
},
},
initialGlobals: {
// 馃憞 Set the initial background color
backgrounds: { value: 'light' },
},
};
export default preview;