- {({ MenuItem, menu, menuItemClassName, menuItemActiveClassName }) => {
- const getButtonOnClick = (newField, newDirection) => () => {
- onChange({ field: newField, direction: newDirection });
- menu.toggle();
- };
-
- return (
-
- {Object.entries(fields).map(([key, item]) => (
-
- ))}
-
- );
- }}
-
- );
-};
-
-SortDropdown.defaultProps = {
- className: '',
- label: 'Order by',
- onChange: () => {},
- field: '',
- direction: 'asc',
-};
-
-SortDropdown.propTypes = {
- className: PropTypes.string,
- label: PropTypes.string,
- fields: PropTypes.shape({
- [PropTypes.string]: PropTypes.string,
- }).isRequired,
- onChange: PropTypes.func,
- field: PropTypes.string,
- direction: PropTypes.string,
-};
diff --git a/packages/ui/src/ui/sort-dropdown/sort-dropdown.module.css b/packages/ui/src/ui/sort-dropdown/sort-dropdown.module.css
deleted file mode 100644
index fcc8605dad..0000000000
--- a/packages/ui/src/ui/sort-dropdown/sort-dropdown.module.css
+++ /dev/null
@@ -1,22 +0,0 @@
-.item {
- display: flex;
- align-items: center;
-}
-
-.itemIcon {
- flex: 0 0 auto;
- visibility: hidden;
- margin-right: var(--space-xxxsmall);
-}
-
-.itemLabel {
- flex: 1 1 100%;
-}
-
-.itemAsc .itemIcon {
- transform: rotate(180deg);
-}
-
-.itemActive .itemIcon {
- visibility: visible;
-}
diff --git a/packages/ui/src/ui/sort-dropdown/sort-dropdown.stories.jsx b/packages/ui/src/ui/sort-dropdown/sort-dropdown.stories.jsx
deleted file mode 100644
index b510f89ea6..0000000000
--- a/packages/ui/src/ui/sort-dropdown/sort-dropdown.stories.jsx
+++ /dev/null
@@ -1,27 +0,0 @@
-import React from 'react';
-
-import { getWrapperDecorator } from '../../stories';
-import { SortDropdown } from '.';
-
-export default {
- title: 'UI/SortDropdown',
- component: SortDropdown,
- decorators: [getWrapperDecorator({ paddingLeft: '200px' })],
-};
-
-export const Default = () => (
-