Skip to content

Commit

Permalink
Hide filter pills from the examples screen (#181)
Browse files Browse the repository at this point in the history
* Hide filter pills from the examples page

* Fix TextInput import on iOS

Co-authored-by: Ansh Godha <[email protected]>
  • Loading branch information
anku255 and AnshG714 authored Jul 29, 2020
1 parent 81d0199 commit 317ef58
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ class RNTesterExampleContainer extends React.Component {
documentationURL={module.documentationURL}>
<RNTesterExampleFilter
testID="example_search"
hideFilterPills={true}
sections={sections}
filter={filter}
render={({filteredSections}) =>
Expand Down
13 changes: 8 additions & 5 deletions packages/RNTester/js/components/RNTesterExampleFilter.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ type Props = {
sections: Object,
disableSearch?: boolean,
testID?: string,
hideFilterPills?: boolean,
...
};

Expand Down Expand Up @@ -98,11 +99,13 @@ class RNTesterExampleFilter extends React.Component<Props, State> {
testID={this.props.testID}
value={this.state.filter}
/>
<RNTesterListFilters
onFilterButtonPress={filterLabel =>
this.setState({category: filterLabel})
}
/>
{!this.props.hideFilterPills && (
<RNTesterListFilters
onFilterButtonPress={(filterLabel) =>
this.setState({category: filterLabel})
}
/>
)}
</View>
);
}}
Expand Down
2 changes: 1 addition & 1 deletion packages/RNTester/js/utils/RNTesterList.ios.js
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ const ComponentExamples: Array<RNTesterExample> = [
},
{
key: 'TextInputExample',
module: require('../examples/TextInput/TextInputExample.ios'),
module: require('../examples/TextInput/TextInputExample'),
category: 'Basic',
supportsTVOS: true,
},
Expand Down

0 comments on commit 317ef58

Please sign in to comment.