Skip to content

Commit

Permalink
Use the new IsAnimatingProvider in the Card component
Browse files Browse the repository at this point in the history
  • Loading branch information
jessepinho committed Aug 15, 2024
1 parent 62e8275 commit 5953b61
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions packages/ui/src/Card/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import styled, { WebTarget } from 'styled-components';
import { hexOpacity } from '../utils/hexOpacity';
import { motion } from 'framer-motion';
import { Title } from './Title';
import { IsAnimatingProvider } from '../IsAnimatingProvider';

const Root = styled.section``;

Expand Down Expand Up @@ -90,9 +91,13 @@ export const Card = ({ children, as = 'section', title, layout, layoutId }: Card
<Root as={as}>
{title && <Title>{title}</Title>}

<Content layout={layout} layoutId={layoutId}>
{children}
</Content>
<IsAnimatingProvider>
{props => (
<Content layout={layout} layoutId={layoutId} {...props}>
{children}
</Content>
)}
</IsAnimatingProvider>
</Root>
);
};
Expand Down

0 comments on commit 5953b61

Please sign in to comment.