fieldErrorReason.tsx 928 B

123456789101112131415161718192021222324252627282930313233343536
  1. import styled from '@emotion/styled';
  2. import {slideInUp} from 'sentry/styles/animations';
  3. const FieldErrorReason = styled('div')`
  4. color: ${p => p.theme.red300};
  5. position: absolute;
  6. right: 2px;
  7. margin-top: 6px;
  8. background: ${p => p.theme.background};
  9. padding: 6px 8px;
  10. font-weight: 600;
  11. font-size: ${p => p.theme.fontSizeSmall};
  12. border-radius: 3px;
  13. box-shadow: 0 0 0 1px rgba(64, 11, 54, 0.15), 0 4px 20px 0 rgba(64, 11, 54, 0.36);
  14. z-index: ${p => p.theme.zIndex.errorMessage};
  15. animation: ${slideInUp} 200ms ease-in-out forwards;
  16. &:before,
  17. &:after {
  18. content: '';
  19. border: 7px solid transparent;
  20. border-bottom-color: ${p => p.theme.background};
  21. position: absolute;
  22. top: -14px;
  23. right: 9px;
  24. }
  25. &:before {
  26. margin-top: -1px;
  27. border-bottom-color: rgba(64, 11, 54, 0.15);
  28. filter: drop-shadow(0 -2px 5px rgba(64, 11, 54, 1));
  29. }
  30. `;
  31. export default FieldErrorReason;