multipleSelectorSubmitRow.tsx 777 B

12345678910111213141516171819202122232425262728293031
  1. import styled from '@emotion/styled';
  2. import Button from 'sentry/components/button';
  3. import {t} from 'sentry/locale';
  4. import {growIn} from 'sentry/styles/animations';
  5. import space from 'sentry/styles/space';
  6. type Props = {
  7. onSubmit: () => void;
  8. disabled?: boolean;
  9. };
  10. const MultipleSelectorSubmitRow = ({onSubmit, disabled = false}: Props) => (
  11. <SubmitButtonContainer>
  12. <SubmitButton disabled={disabled} onClick={onSubmit} size="xs" priority="primary">
  13. {t('Apply')}
  14. </SubmitButton>
  15. </SubmitButtonContainer>
  16. );
  17. const SubmitButtonContainer = styled('div')`
  18. display: flex;
  19. justify-content: flex-end;
  20. `;
  21. const SubmitButton = styled(Button)`
  22. animation: 0.1s ${growIn} ease-in;
  23. margin: ${space(0.5)} 0;
  24. `;
  25. export default MultipleSelectorSubmitRow;