import {Button} from 'sentry/components/button'; import {CompositeSelect} from 'sentry/components/compactSelect/composite'; import {ReleasesSortOption} from 'sentry/constants/releases'; import {IconSort} from 'sentry/icons'; import {t} from 'sentry/locale'; export const SORT_BY_OPTIONS = { [ReleasesSortOption.SESSIONS_24_HOURS]: {label: t('Active Sessions')}, [ReleasesSortOption.USERS_24_HOURS]: {label: t('Active Users')}, [ReleasesSortOption.ADOPTION]: {label: t('Adoption')}, [ReleasesSortOption.BUILD]: {label: t('Build Number')}, [ReleasesSortOption.DATE]: {label: t('Date Created')}, [ReleasesSortOption.SEMVER]: {label: t('Semantic Version')}, [ReleasesSortOption.SESSIONS]: {label: t('Total Sessions')}, }; export type ReleasesSortByOption = keyof typeof SORT_BY_OPTIONS; interface Props { environments: string[]; onChange: (sortBy: string) => void; sortBy: ReleasesSortByOption; } export function ReleasesSort({environments, sortBy, onChange}: Props) { return ( (