From a8e32f4eba8b336f32146a803c04a3a04f2144ca Mon Sep 17 00:00:00 2001 From: jay-hodgson Date: Wed, 15 Jan 2025 12:35:23 -0800 Subject: [PATCH] add a fade and slide to portal feature highlights --- .../PortalFeatureHighlights.tsx | 50 ++++++++++++++----- 1 file changed, 37 insertions(+), 13 deletions(-) diff --git a/packages/synapse-react-client/src/components/PortalFeatureHighlights/PortalFeatureHighlights.tsx b/packages/synapse-react-client/src/components/PortalFeatureHighlights/PortalFeatureHighlights.tsx index 1ae94ed827..5daadcf7fa 100644 --- a/packages/synapse-react-client/src/components/PortalFeatureHighlights/PortalFeatureHighlights.tsx +++ b/packages/synapse-react-client/src/components/PortalFeatureHighlights/PortalFeatureHighlights.tsx @@ -1,5 +1,14 @@ -import { Typography, Button, CardMedia, Stack, Box } from '@mui/material' +import { + Typography, + Button, + CardMedia, + Stack, + Box, + Fade, + Slide, +} from '@mui/material' import React from 'react' +import { useInView } from 'react-intersection-observer' import { Link } from 'react-router-dom' export type PortalFeatureHighlightsProps = { @@ -11,11 +20,14 @@ export type PortalFeatureHighlightsProps = { link?: string } +const transitionTimeoutMs = 400 + const PortalFeatureHighlights = (props: PortalFeatureHighlightsProps) => { const { reverseOrder, image, title, buttonText, summaryText, link } = props - + const [ref, inView] = useInView({ threshold: 0.3, triggerOnce: true }) return ( { }, }} > - + +
+ +
+ +
+
+
+