(props: InfoCardProps)
| 52 | } |
| 53 | |
| 54 | export function InfoCard(props: InfoCardProps) { |
| 55 | const { |
| 56 | classNameDescription, |
| 57 | classNameTitle, |
| 58 | description, |
| 59 | icon, |
| 60 | link, |
| 61 | svg, |
| 62 | title, |
| 63 | titleProps, |
| 64 | ...other |
| 65 | } = props; |
| 66 | return ( |
| 67 | <Paper |
| 68 | variant="outlined" |
| 69 | component={link ? Link : 'div'} |
| 70 | href={link} |
| 71 | {...(link |
| 72 | ? { |
| 73 | noLinkStyle: true, |
| 74 | // Fix overloading with prefetch={false}, only prefetch on hover. |
| 75 | prefetch: false, |
| 76 | } |
| 77 | : {})} |
| 78 | sx={(theme) => ({ |
| 79 | p: 2.5, |
| 80 | height: '100%', |
| 81 | background: `${(theme.vars || theme).palette.gradients.linearSubtle}`, |
| 82 | ...theme.applyDarkStyles({ |
| 83 | bgcolor: alpha(theme.palette.primaryDark[800], 0.25), |
| 84 | background: `${(theme.vars || theme).palette.gradients.linearSubtle}`, |
| 85 | borderColor: 'primaryDark.700', |
| 86 | }), |
| 87 | })} |
| 88 | {...other} |
| 89 | > |
| 90 | {svg && svg} |
| 91 | {icon && <GlowingIconContainer icon={icon} />} |
| 92 | <Typography |
| 93 | component="h3" |
| 94 | variant="body2" |
| 95 | className={classNameTitle} |
| 96 | {...titleProps} |
| 97 | sx={[ |
| 98 | { |
| 99 | fontWeight: 'semiBold', |
| 100 | color: 'text.primary', |
| 101 | mt: icon ? 2 : 0, |
| 102 | mb: description ? 0.5 : 0, |
| 103 | }, |
| 104 | ...(Array.isArray(titleProps?.sx) ? titleProps.sx : [titleProps?.sx]), |
| 105 | ]} |
| 106 | > |
| 107 | {title} |
| 108 | </Typography> |
| 109 | <Typography variant="body2" sx={{ color: 'text.secondary' }} className={classNameDescription}> |
| 110 | {description} |
| 111 | </Typography> |
nothing calls this directly
no test coverage detected
searching dependent graphs…