issueActionWrapper.tsx 699 B

12345678910111213141516171819202122232425262728293031
  1. import {keyframes} from '@emotion/react';
  2. import styled from '@emotion/styled';
  3. import useOrganization from 'sentry/utils/useOrganization';
  4. type ActionButtonContainerProps = {children: JSX.Element};
  5. export function IssueActionWrapper({children}: ActionButtonContainerProps) {
  6. const organization = useOrganization();
  7. if (!organization.features.includes('issue-priority-ui')) {
  8. return children;
  9. }
  10. return <AnimatedWrapper>{children}</AnimatedWrapper>;
  11. }
  12. const reveal = keyframes`
  13. from {
  14. opacity: 0;
  15. transform: translateY(10px);
  16. }
  17. to {
  18. opacity: 1;
  19. transform: translateY(0);
  20. }
  21. `;
  22. const AnimatedWrapper = styled('div')`
  23. animation: ${reveal} 200ms ease-out;
  24. `;