Skip to content

Commit

Permalink
refactor: reuse the styles
Browse files Browse the repository at this point in the history
  • Loading branch information
VanishMax committed Aug 19, 2024
1 parent 3675e56 commit c154f24
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
15 changes: 2 additions & 13 deletions packages/ui/src/Tooltip/index.tsx
Original file line number Diff line number Diff line change
@@ -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'),
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/src/utils/popover.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import styled, { keyframes } from 'styled-components';

const scaleIn = keyframes`
export const scaleIn = keyframes`
from {
opacity: 0;
transform: scale(0);
Expand Down

0 comments on commit c154f24

Please sign in to comment.