-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Chore: Migrate ShareListView to Typescript #3459
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
Changes from 5 commits
b4af521
109ba9b
2436b8d
d0d1ddc
5441f7f
120ce08
c3bd533
9f38161
bd1fe3e
c89a451
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,5 @@ | ||
| import React from 'react'; | ||
| import { StyleSheet, Text, View } from 'react-native'; | ||
| import PropTypes from 'prop-types'; | ||
|
|
||
| import TextInput from '../../../presentation/TextInput'; | ||
| import I18n from '../../../i18n'; | ||
|
|
@@ -24,7 +23,13 @@ const styles = StyleSheet.create({ | |
| } | ||
| }); | ||
|
|
||
| const Header = React.memo(({ searching, onChangeSearchText, theme }) => { | ||
| interface IHeader { | ||
| searching: boolean; | ||
|
reinaldonetof marked this conversation as resolved.
Outdated
|
||
| onChangeSearchText(text: string): void; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I always have my doubts on this case if we should just rename the function (so we can just extend
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
| theme: string; | ||
| } | ||
|
|
||
| const Header = React.memo(({ searching, onChangeSearchText, theme }: IHeader) => { | ||
| const titleColorStyle = { color: themes[theme].headerTintColor }; | ||
| const isLight = theme === 'light'; | ||
| if (searching) { | ||
|
|
@@ -43,10 +48,4 @@ const Header = React.memo(({ searching, onChangeSearchText, theme }) => { | |
| return <Text style={[styles.title, titleColorStyle]}>{I18n.t('Send_to')}</Text>; | ||
| }); | ||
|
|
||
| Header.propTypes = { | ||
| searching: PropTypes.bool, | ||
| onChangeSearchText: PropTypes.func, | ||
| theme: PropTypes.string | ||
| }; | ||
|
|
||
| export default Header; | ||
Uh oh!
There was an error while loading. Please reload this page.