releaseListStatusOptions.tsx 785 B

123456789101112131415161718192021222324252627282930313233343536
  1. import styled from '@emotion/styled';
  2. import {t} from 'app/locale';
  3. import ReleaseListDropdown from './releaseListDropdown';
  4. import {StatusOption} from './utils';
  5. const options = {
  6. [StatusOption.ACTIVE]: {label: t('Active')},
  7. [StatusOption.ARCHIVED]: {label: t('Archived')},
  8. };
  9. type Props = {
  10. selected: StatusOption;
  11. onSelect: (key: string) => void;
  12. };
  13. function ReleaseListStatusOptions({selected, onSelect}: Props) {
  14. return (
  15. <StyledReleaseListDropdown
  16. label={t('Status')}
  17. options={options}
  18. selected={selected}
  19. onSelect={onSelect}
  20. />
  21. );
  22. }
  23. export default ReleaseListStatusOptions;
  24. const StyledReleaseListDropdown = styled(ReleaseListDropdown)`
  25. z-index: 3;
  26. @media (max-width: ${p => p.theme.breakpoints[2]}) {
  27. order: 1;
  28. }
  29. `;