Skip to content

RNTester: Fix playground icon & test details button #50530

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 25 additions & 24 deletions packages/rn-tester/js/components/RNTTestDetails.js
Original file line number Diff line number Diff line change
@@ -25,30 +25,31 @@ function RNTTestDetails({
}): React.Node {
const [collapsed, setCollapsed] = React.useState(true);

const content = (
<>
{description == null ? null : (
<View style={styles.section}>
<Text style={[styles.heading, {color: theme.LabelColor}]}>
Description
</Text>
<Text style={[styles.paragraph, {color: theme.LabelColor}]}>
{description}
</Text>
</View>
)}
{expect == null ? null : (
<View style={styles.section}>
<Text style={[styles.heading, {color: theme.LabelColor}]}>
Expectation
</Text>
<Text style={[styles.paragraph, {color: theme.LabelColor}]}>
{expect}
</Text>
</View>
)}
</>
);
const content =
description == null && expect == null ? null : (
<>
{description == null ? null : (
<View style={styles.section}>
<Text style={[styles.heading, {color: theme.LabelColor}]}>
Description
</Text>
<Text style={[styles.paragraph, {color: theme.LabelColor}]}>
{description}
</Text>
</View>
)}
{expect == null ? null : (
<View style={styles.section}>
<Text style={[styles.heading, {color: theme.LabelColor}]}>
Expectation
</Text>
<Text style={[styles.paragraph, {color: theme.LabelColor}]}>
{expect}
</Text>
</View>
)}
</>
);
return (
<View
style={StyleSheet.compose(styles.container, {
4 changes: 2 additions & 2 deletions packages/rn-tester/js/components/RNTesterTheme.js
Original file line number Diff line number Diff line change
@@ -133,8 +133,8 @@ export const RNTesterDarkTheme = {
NavBarComponentsInactiveIcon: require('./../assets/bottom-nav-components-icon-dark.png'),
NavBarAPIsActiveIcon: require('./../assets/bottom-nav-apis-icon-light.png'),
NavBarAPIsInactiveIcon: require('./../assets/bottom-nav-apis-icon-dark.png'),
NavBarPlaygroundActiveIcon: require('./../assets/bottom-nav-playgrounds-icon-dark.png'),
NavBarPlaygroundInactiveIcon: require('./../assets/bottom-nav-playgrounds-icon-light.png'),
NavBarPlaygroundActiveIcon: require('./../assets/bottom-nav-playgrounds-icon-light.png'),
NavBarPlaygroundInactiveIcon: require('./../assets/bottom-nav-playgrounds-icon-dark.png'),
Comment on lines +136 to +137
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice :)

};

export const themes = {light: RNTesterLightTheme, dark: RNTesterDarkTheme};
Original file line number Diff line number Diff line change
@@ -34,5 +34,6 @@ const styles = StyleSheet.create({
export default ({
title: 'Playground',
name: 'playground',
description: 'Test out new features and ideas.',
render: (): React.Node => <Playground />,
}: RNTesterModuleExample);
Loading