2019-07-29 16:33:28 +00:00
|
|
|
import React from 'react';
|
|
|
|
import PropTypes from 'prop-types';
|
|
|
|
|
|
|
|
import Header from './Header';
|
|
|
|
|
|
|
|
const ShareListHeader = React.memo(({
|
2019-12-04 16:39:53 +00:00
|
|
|
searching, initSearch, cancelSearch, search, theme
|
2019-07-29 16:33:28 +00:00
|
|
|
}) => {
|
|
|
|
const onSearchChangeText = (text) => {
|
|
|
|
search(text.trim());
|
|
|
|
};
|
|
|
|
|
|
|
|
return (
|
|
|
|
<Header
|
2019-12-04 16:39:53 +00:00
|
|
|
theme={theme}
|
2019-07-29 16:33:28 +00:00
|
|
|
searching={searching}
|
|
|
|
initSearch={initSearch}
|
|
|
|
cancelSearch={cancelSearch}
|
|
|
|
onChangeSearchText={onSearchChangeText}
|
|
|
|
/>
|
|
|
|
);
|
|
|
|
});
|
|
|
|
|
|
|
|
ShareListHeader.propTypes = {
|
|
|
|
searching: PropTypes.bool,
|
|
|
|
initSearch: PropTypes.func,
|
|
|
|
cancelSearch: PropTypes.func,
|
2019-12-04 16:39:53 +00:00
|
|
|
search: PropTypes.func,
|
|
|
|
theme: PropTypes.string
|
2019-07-29 16:33:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
export default ShareListHeader;
|