choseDataStep.tsx 905 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. import {t} from 'sentry/locale';
  2. import RadioField from 'sentry/views/settings/components/forms/radioField';
  3. import BuildStep from './buildStep';
  4. import {DataSet} from './utils';
  5. const dataSetChoices: [string, string][] = [
  6. [DataSet.EVENTS, t('Events')],
  7. [DataSet.METRICS, t('Metrics')],
  8. ];
  9. type Props = {
  10. value: DataSet;
  11. onChange: (value: DataSet) => void;
  12. };
  13. function ChooseDataSetStep({value, onChange}: Props) {
  14. return (
  15. <BuildStep
  16. title={t('Choose your data set')}
  17. description={t(
  18. 'Monitor specific events such as errors and transactions or get metric readings on TBD.'
  19. )}
  20. >
  21. <RadioField
  22. name="dataSet"
  23. onChange={onChange}
  24. value={value}
  25. choices={dataSetChoices}
  26. inline={false}
  27. orientInline
  28. hideControlState
  29. stacked
  30. />
  31. </BuildStep>
  32. );
  33. }
  34. export default ChooseDataSetStep;