diff --git a/packages/ui/src/Tooltip/index.tsx b/packages/ui/src/Tooltip/index.tsx index ba7364baf4..0ccd6fcb41 100644 --- a/packages/ui/src/Tooltip/index.tsx +++ b/packages/ui/src/Tooltip/index.tsx @@ -1,21 +1,10 @@ import * as RadixTooltip from '@radix-ui/react-tooltip'; import { ReactNode } from 'react'; -import styled, { keyframes } from 'styled-components'; +import styled from 'styled-components'; import { Text } from '../Text'; import { buttonBase } from '../utils/button'; import { small } from '../utils/typography'; - -const scaleIn = keyframes` - from { - opacity: 0; - transform: scale(0); - } - - to { - opacity: 1; - transform: scale(1); - } -`; +import { scaleIn } from '../utils/popover.ts'; const Content = styled(RadixTooltip.Content).attrs(props => ({ sideOffset: props.theme.spacing(1, 'number'), diff --git a/packages/ui/src/utils/popover.ts b/packages/ui/src/utils/popover.ts index 7ec4cdf859..174deaa044 100644 --- a/packages/ui/src/utils/popover.ts +++ b/packages/ui/src/utils/popover.ts @@ -1,6 +1,6 @@ import styled, { keyframes } from 'styled-components'; -const scaleIn = keyframes` +export const scaleIn = keyframes` from { opacity: 0; transform: scale(0);