-
-
Notifications
You must be signed in to change notification settings - Fork 159
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: use modern build of storybook to fix unresolved promises and oth…
…er issues caused by polyfills [6.0] (#174) * fix(): update all dependencies to latest alpha with fix for polyfils * refactor: promise finally button * refactor: rename the globtest folder
- Loading branch information
Showing
25 changed files
with
2,609 additions
and
1,783 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
app/react-native/src/preview/components/OnDeviceUI/OnDeviceUI.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
app/react-native/src/preview/components/OnDeviceUI/addons/Addons.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 2 additions & 3 deletions
5
app/react-native/src/preview/components/StoryListView/StoryListView.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
app/react-native/src/preview/components/StoryView/StoryView.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,6 @@ | ||
module.exports = { | ||
//stories: ['./components/*/*.stories.?(ts|tsx|js|jsx)', './globtest/Buttonx/Buttonx.stories.tsx'], | ||
stories: ['./components/Button/Button.stories.tsx'], | ||
stories: [ | ||
'./components/*/*.stories.?(ts|tsx|js|jsx)', | ||
'./other_components/AnotherButton/AnotherButton.stories.tsx', | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,22 @@ | ||
import { storiesOf } from '@storybook/react-native'; | ||
import React from 'react'; | ||
import { storiesOf } from '@storybook/react-native'; | ||
import { Button } from './Button'; | ||
|
||
storiesOf('button2', module) | ||
.add('example2', () => <Button text="test3" onPress={() => null} />) | ||
.add('example3', () => <Button text="test4" onPress={() => null} />); | ||
const testing = () => { | ||
const timeout = new Promise((resolve) => { | ||
setTimeout(() => { | ||
resolve('hi'); | ||
}, 1000); | ||
}); | ||
timeout | ||
.then((res) => { | ||
console.log(res); | ||
}) | ||
.finally(() => { | ||
console.log('resolved '); | ||
}); | ||
}; | ||
|
||
storiesOf('button promise', module) | ||
.add('finally', () => <Button text="Do a promise" onPress={testing} />) | ||
.add('nothing', () => <Button text="test4" onPress={() => null} />); |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,4 +16,7 @@ module.exports = { | |
}, | ||
}), | ||
}, | ||
resolver: { | ||
resolverMainFields: ['sbmodern', 'main'], | ||
}, | ||
}; |
7 changes: 7 additions & 0 deletions
7
examples/native/other_components/AnotherButton/AnotherButton.stories.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
import { storiesOf } from '@storybook/react-native'; | ||
import React from 'react'; | ||
import { Button } from './AnotherButton'; | ||
|
||
storiesOf('Another Button', module) | ||
.add('another button example', () => <Button text="test" onPress={() => null} />) | ||
.add('again', () => <Button text="test2" onPress={() => null} />); |
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
export { Button } from './AnotherButton'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.