Rocket.Chat.ReactNative/app/views/RoomsListView/ListHeader/index.js

27 lines
676 B
JavaScript
Raw Normal View History

2019-04-17 18:57:46 +00:00
import React from 'react';
import PropTypes from 'prop-types';
import SearchBar from './SearchBar';
import Directory from './Directory';
2019-04-17 18:57:46 +00:00
import Sort from './Sort';
const ListHeader = React.memo(({
searchLength, sortBy, onChangeSearchText, toggleSort, goDirectory
2019-04-17 18:57:46 +00:00
}) => (
<>
2019-04-17 18:57:46 +00:00
<SearchBar onChangeSearchText={onChangeSearchText} />
<Directory goDirectory={goDirectory} />
2019-04-17 18:57:46 +00:00
<Sort searchLength={searchLength} sortBy={sortBy} toggleSort={toggleSort} />
</>
2019-04-17 18:57:46 +00:00
));
ListHeader.propTypes = {
searchLength: PropTypes.number,
sortBy: PropTypes.string,
onChangeSearchText: PropTypes.func,
toggleSort: PropTypes.func,
goDirectory: PropTypes.func
2019-04-17 18:57:46 +00:00
};
export default ListHeader;