You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
43 lines
1.1 KiB
43 lines
1.1 KiB
7 years ago
|
import PropTypes from 'prop-types';
|
||
|
import React from 'react';
|
||
1 year ago
|
import ArtistIndexFilterModal from 'Artist/Index/ArtistIndexFilterModal';
|
||
4 years ago
|
import FilterMenu from 'Components/Menu/FilterMenu';
|
||
|
import { align } from 'Helpers/Props';
|
||
7 years ago
|
|
||
|
function ArtistIndexFilterMenu(props) {
|
||
|
const {
|
||
6 years ago
|
selectedFilterKey,
|
||
|
filters,
|
||
|
customFilters,
|
||
7 years ago
|
isDisabled,
|
||
1 year ago
|
onFilterSelect,
|
||
7 years ago
|
} = props;
|
||
|
|
||
|
return (
|
||
7 years ago
|
<FilterMenu
|
||
|
alignMenu={align.RIGHT}
|
||
6 years ago
|
isDisabled={isDisabled}
|
||
|
selectedFilterKey={selectedFilterKey}
|
||
|
filters={filters}
|
||
|
customFilters={customFilters}
|
||
1 year ago
|
filterModalConnectorComponent={ArtistIndexFilterModal}
|
||
6 years ago
|
onFilterSelect={onFilterSelect}
|
||
|
/>
|
||
7 years ago
|
);
|
||
|
}
|
||
|
|
||
|
ArtistIndexFilterMenu.propTypes = {
|
||
1 year ago
|
selectedFilterKey: PropTypes.oneOfType([PropTypes.string, PropTypes.number])
|
||
|
.isRequired,
|
||
6 years ago
|
filters: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||
|
customFilters: PropTypes.arrayOf(PropTypes.object).isRequired,
|
||
7 years ago
|
isDisabled: PropTypes.bool.isRequired,
|
||
1 year ago
|
onFilterSelect: PropTypes.func.isRequired,
|
||
7 years ago
|
};
|
||
|
|
||
6 years ago
|
ArtistIndexFilterMenu.defaultProps = {
|
||
1 year ago
|
showCustomFilters: false,
|
||
6 years ago
|
};
|
||
|
|
||
7 years ago
|
export default ArtistIndexFilterMenu;
|