Skip to content

Commit 7a58afb

Browse files
committed
Merge branch 'develop' into feat/switch
# Conflicts: # src/components/index.ts # src/index.tsx
2 parents 2b65a45 + 54da633 commit 7a58afb

File tree

29 files changed

+852
-150
lines changed

29 files changed

+852
-150
lines changed

docs/theme.md

Lines changed: 462 additions & 0 deletions
Large diffs are not rendered by default.

example/.ondevice/doctools.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
import { extractArgTypes } from "@storybook/react/dist/modern/client/docs/extractArgTypes";
2-
import { addArgTypesEnhancer, addParameters } from "@storybook/react-native";
3-
import { enhanceArgTypes } from "@storybook/docs-tools";
1+
import {extractArgTypes} from '@storybook/react/dist/modern/client/docs/extractArgTypes'
2+
import {addArgTypesEnhancer, addParameters} from '@storybook/react-native'
3+
import {enhanceArgTypes} from '@storybook/docs-tools'
44

5-
addArgTypesEnhancer(enhanceArgTypes);
5+
addArgTypesEnhancer(enhanceArgTypes)
66
addParameters({
77
docs: {
88
extractArgTypes,
99
},
10-
});
10+
})

example/.ondevice/main.js

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
module.exports = {
2-
stories: [
3-
'../src/**/*.stories.?(ts|tsx|js|jsx)'
4-
],
5-
addons: [
2+
stories: ['../src/**/*.stories.?(ts|tsx|js|jsx)'],
3+
addons: [
64
'@storybook/addon-ondevice-notes',
75
'@storybook/addon-ondevice-controls',
86
'@storybook/addon-ondevice-backgrounds',
97
'@storybook/addon-ondevice-actions',
108
],
11-
};
9+
}

example/.ondevice/preview.js

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
1-
import { withBackgrounds } from "@storybook/addon-ondevice-backgrounds";
2-
export const decorators = [withBackgrounds];
1+
import {withBackgrounds} from '@storybook/addon-ondevice-backgrounds'
2+
export const decorators = [withBackgrounds]
33
export const parameters = {
44
backgrounds: {
5-
default: "plain",
5+
default: 'plain',
66
values: [
7-
{ name: "plain", value: "white" },
8-
{ name: "warm", value: "hotpink" },
9-
{ name: "cool", value: "deepskyblue" },
7+
{name: 'plain', value: 'white'},
8+
{name: 'warm', value: 'hotpink'},
9+
{name: 'cool', value: 'deepskyblue'},
1010
],
1111
},
12-
actions: { argTypesRegex: "^on[A-Z].*" },
12+
actions: {argTypesRegex: '^on[A-Z].*'},
1313
controls: {
1414
matchers: {
1515
color: /(background|color)$/i,
1616
date: /Date$/,
1717
},
1818
},
19-
};
19+
}

example/.ondevice/storybook.requires.js

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -6,52 +6,52 @@ import {
66
addParameters,
77
addArgsEnhancer,
88
clearDecorators,
9-
} from "@storybook/react-native";
9+
} from '@storybook/react-native'
1010

1111
global.STORIES = [
1212
{
13-
titlePrefix: "",
14-
directory: "./src",
15-
files: "**/*.stories.?(ts|tsx|js|jsx)",
13+
titlePrefix: '',
14+
directory: './src',
15+
files: '**/*.stories.?(ts|tsx|js|jsx)',
1616
importPathMatcher:
17-
"^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.(?:ts|tsx|js|jsx)?)$",
17+
'^\\.[\\\\/](?:src(?:\\/(?!\\.)(?:(?:(?!(?:^|\\/)\\.).)*?)\\/|\\/|$)(?!\\.)(?=.)[^/]*?\\.stories\\.(?:ts|tsx|js|jsx)?)$',
1818
},
19-
];
19+
]
2020

21-
import "@storybook/addon-ondevice-notes/register";
22-
import "@storybook/addon-ondevice-controls/register";
23-
import "@storybook/addon-ondevice-backgrounds/register";
24-
import "@storybook/addon-ondevice-actions/register";
21+
import '@storybook/addon-ondevice-notes/register'
22+
import '@storybook/addon-ondevice-controls/register'
23+
import '@storybook/addon-ondevice-backgrounds/register'
24+
import '@storybook/addon-ondevice-actions/register'
2525

26-
import { argsEnhancers } from "@storybook/addon-actions/dist/modern/preset/addArgs";
26+
import {argsEnhancers} from '@storybook/addon-actions/dist/modern/preset/addArgs'
2727

28-
import { decorators, parameters } from "./preview";
28+
import {decorators, parameters} from './preview'
2929

3030
if (decorators) {
3131
if (__DEV__) {
3232
// stops the warning from showing on every HMR
33-
require("react-native").LogBox.ignoreLogs([
34-
"`clearDecorators` is deprecated and will be removed in Storybook 7.0",
35-
]);
33+
require('react-native').LogBox.ignoreLogs([
34+
'`clearDecorators` is deprecated and will be removed in Storybook 7.0',
35+
])
3636
}
3737
// workaround for global decorators getting infinitely applied on HMR, see https://github.com/storybookjs/react-native/issues/185
38-
clearDecorators();
39-
decorators.forEach((decorator) => addDecorator(decorator));
38+
clearDecorators()
39+
decorators.forEach(decorator => addDecorator(decorator))
4040
}
4141

4242
if (parameters) {
43-
addParameters(parameters);
43+
addParameters(parameters)
4444
}
4545

4646
try {
47-
argsEnhancers.forEach((enhancer) => addArgsEnhancer(enhancer));
47+
argsEnhancers.forEach(enhancer => addArgsEnhancer(enhancer))
4848
} catch {}
4949

5050
const getStories = () => {
5151
return {
52-
"./src/stories/Button.stories.tsx": require("../src/stories/Button.stories.tsx"),
53-
"./src/stories/Switch.stories.tsx": require("../src/stories/Switch.stories.tsx"),
54-
};
55-
};
52+
'./src/stories/Button.stories.tsx': require('../src/stories/Button.stories.tsx'),
53+
'./src/stories/Switch.stories.tsx': require('../src/stories/Switch.stories.tsx'),
54+
}
55+
}
5656

57-
configure(getStories, module, false);
57+
configure(getStories, module, false)

example/.storybook/main.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,5 @@
11
module.exports = {
2-
stories: ["../src/**/*.stories.?(ts|tsx|js|jsx)"],
3-
addons: [
4-
"@storybook/addon-links",
5-
"@storybook/addon-essentials",
6-
"@storybook/addon-react-native-web",
7-
],
8-
framework: "@storybook/react",
9-
};
2+
stories: ['../src/**/*.stories.?(ts|tsx|js|jsx)'],
3+
addons: ['@storybook/addon-links', '@storybook/addon-essentials', '@storybook/addon-react-native-web'],
4+
framework: '@storybook/react',
5+
}

example/.storybook/preview.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
export const parameters = {
2-
actions: { argTypesRegex: "^on[A-Z].*" },
2+
actions: {argTypesRegex: '^on[A-Z].*'},
33
controls: {
44
matchers: {
55
color: /(background|color)$/i,
66
date: /Date$/,
77
},
88
},
9-
}
9+
}

example/app.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
{
22
"name": "RnBaseComponentExample",
33
"displayName": "RnBaseComponentExample"
4-
}
4+
}

example/ios/Podfile.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -647,11 +647,11 @@ SPEC CHECKSUMS:
647647
Flipper-RSocket: d9d9ade67cbecf6ac10730304bf5607266dd2541
648648
FlipperKit: cbdee19bdd4e7f05472a66ce290f1b729ba3cb86
649649
fmt: ff9d55029c625d3757ed641535fd4a75fedc7ce9
650-
glog: 04b94705f318337d7ead9e6d17c019bd9b1f6b1b
651-
hermes-engine: a1f157c49ea579c28b0296bda8530e980c45bdb3
650+
glog: 791fe035093b84822da7f0870421a25839ca7870
651+
hermes-engine: 5d86dc4303697a1251c830f0ee45e6e9f33877d4
652652
libevent: 4049cae6c81cdb3654a443be001fb9bdceff7913
653653
OpenSSL-Universal: ebc357f1e6bc71fa463ccb2fe676756aff50e88c
654-
RCT-Folly: 424b8c9a7a0b9ab2886ffe9c3b041ef628fd4fb1
654+
RCT-Folly: 186619bc27c1f94f2f7c6ef60927516c71005915
655655
RCTRequired: 5a024fdf458fa8c0d82fc262e76f982d4dcdecdd
656656
RCTTypeSafety: b6c253064466411c6810b45f66bc1e43ce0c54ba
657657
React: 715292db5bd46989419445a5547954b25d2090f0
@@ -691,4 +691,4 @@ SPEC CHECKSUMS:
691691

692692
PODFILE CHECKSUM: 5eddd6af0376deacea0a9cf5568699be94aab722
693693

694-
COCOAPODS: 1.11.3
694+
COCOAPODS: 1.12.1
Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,53 @@
11
{
2-
"images" : [
2+
"images": [
33
{
4-
"idiom" : "iphone",
5-
"scale" : "2x",
6-
"size" : "20x20"
4+
"idiom": "iphone",
5+
"scale": "2x",
6+
"size": "20x20"
77
},
88
{
9-
"idiom" : "iphone",
10-
"scale" : "3x",
11-
"size" : "20x20"
9+
"idiom": "iphone",
10+
"scale": "3x",
11+
"size": "20x20"
1212
},
1313
{
14-
"idiom" : "iphone",
15-
"scale" : "2x",
16-
"size" : "29x29"
14+
"idiom": "iphone",
15+
"scale": "2x",
16+
"size": "29x29"
1717
},
1818
{
19-
"idiom" : "iphone",
20-
"scale" : "3x",
21-
"size" : "29x29"
19+
"idiom": "iphone",
20+
"scale": "3x",
21+
"size": "29x29"
2222
},
2323
{
24-
"idiom" : "iphone",
25-
"scale" : "2x",
26-
"size" : "40x40"
24+
"idiom": "iphone",
25+
"scale": "2x",
26+
"size": "40x40"
2727
},
2828
{
29-
"idiom" : "iphone",
30-
"scale" : "3x",
31-
"size" : "40x40"
29+
"idiom": "iphone",
30+
"scale": "3x",
31+
"size": "40x40"
3232
},
3333
{
34-
"idiom" : "iphone",
35-
"scale" : "2x",
36-
"size" : "60x60"
34+
"idiom": "iphone",
35+
"scale": "2x",
36+
"size": "60x60"
3737
},
3838
{
39-
"idiom" : "iphone",
40-
"scale" : "3x",
41-
"size" : "60x60"
39+
"idiom": "iphone",
40+
"scale": "3x",
41+
"size": "60x60"
4242
},
4343
{
44-
"idiom" : "ios-marketing",
45-
"scale" : "1x",
46-
"size" : "1024x1024"
44+
"idiom": "ios-marketing",
45+
"scale": "1x",
46+
"size": "1024x1024"
4747
}
4848
],
49-
"info" : {
50-
"author" : "xcode",
51-
"version" : 1
49+
"info": {
50+
"author": "xcode",
51+
"version": 1
5252
}
5353
}

0 commit comments

Comments
 (0)