releasesStatusOptions.tsx 840 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import styled from '@emotion/styled';
  2. import {t} from 'sentry/locale';
  3. import ReleasesDropdown from './releasesDropdown';
  4. export enum ReleasesStatusOption {
  5. ACTIVE = 'active',
  6. ARCHIVED = 'archived',
  7. }
  8. const options = {
  9. [ReleasesStatusOption.ACTIVE]: {label: t('Active')},
  10. [ReleasesStatusOption.ARCHIVED]: {label: t('Archived')},
  11. };
  12. type Props = {
  13. onSelect: (key: string) => void;
  14. selected: ReleasesStatusOption;
  15. };
  16. function ReleasesStatusOptions({selected, onSelect}: Props) {
  17. return (
  18. <StyledReleasesDropdown
  19. label={t('Status')}
  20. options={options}
  21. selected={selected}
  22. onSelect={onSelect}
  23. />
  24. );
  25. }
  26. export default ReleasesStatusOptions;
  27. const StyledReleasesDropdown = styled(ReleasesDropdown)`
  28. z-index: 3;
  29. @media (max-width: ${p => p.theme.breakpoints.large}) {
  30. order: 1;
  31. }
  32. `;