forked from microsoft/react-native-macos
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a new playground component to rntester (facebook#46632)
Summary: Pull Request resolved: facebook#46632 Changelog: [rntester] Add Playground to RNTester for testing out features & submitting reproducers. **Context** - Adding the Playground from Catalyst to RNTester - This should help folks test React Native features for a particular version **Change** - Add a new playground component to RNTester - Add a new reducer action for opening an example from navbar press - Fixed typing issues - Add icon from this fb asset pack: https://www.internalfb.com/assets/set/facebook_icons/nucleus-beaker/variant_outline-size_24?q=beaker - Matched background color using this imagemagick script **dark** ``` convert input.png -fill 'rgb(178,180,186)' -colorize 100% output.png ``` **light** ``` convert input.png -fill 'rgb(81,82,84)' -colorize 100% output.png ``` Reviewed By: NickGerleman Differential Revision: D61972594
- Loading branch information
1 parent
0cb32d5
commit 3589cd0
Showing
13 changed files
with
148 additions
and
16 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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
18 changes: 18 additions & 0 deletions
18
packages/rn-tester/js/examples/Playground/PlaygroundExample.js
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,18 @@ | ||
/** | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* @format | ||
* @flow strict-local | ||
*/ | ||
|
||
import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; | ||
|
||
import Playground from './RNTesterPlayground'; | ||
|
||
export const title = Playground.title; | ||
export const framework = 'React'; | ||
export const description = 'Test out new features and ideas.'; | ||
export const examples: Array<RNTesterModuleExample> = [Playground]; |
35 changes: 35 additions & 0 deletions
35
packages/rn-tester/js/examples/Playground/RNTesterPlayground.js
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,35 @@ | ||
/** | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
* | ||
* @flow strict-local | ||
* @format | ||
* @oncall react_native | ||
*/ | ||
|
||
import type {RNTesterModuleExample} from '../../types/RNTesterTypes'; | ||
|
||
import * as React from 'react'; | ||
import {StyleSheet, Text, View} from 'react-native'; | ||
|
||
function Playground() { | ||
return ( | ||
<View style={styles.container}> | ||
<Text>Edit "RNTesterPlayground.js" to change this file</Text> | ||
</View> | ||
); | ||
} | ||
|
||
const styles = StyleSheet.create({ | ||
container: { | ||
padding: 10, | ||
}, | ||
}); | ||
|
||
export default ({ | ||
title: 'Playground', | ||
name: 'playground', | ||
render: (): React.Node => <Playground />, | ||
}: RNTesterModuleExample); |
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