mirror of
https://github.com/Unleash/unleash.git
synced 2025-08-27 13:49:10 +02:00
update style of integration cards
This commit is contained in:
parent
7b0fbb22d6
commit
67b04c9731
@ -11,6 +11,7 @@ interface IAvailableIntegrationsProps {
|
||||
|
||||
const StyledGrid = styled('div')(({ theme }) => ({
|
||||
gridTemplateColumns: 'repeat(auto-fit, minmax(350px, 1fr))',
|
||||
gridAutoRows: '1fr',
|
||||
gap: theme.spacing(2),
|
||||
display: 'grid',
|
||||
}));
|
||||
@ -24,6 +25,7 @@ export const AvailableIntegrations: VFC<IAvailableIntegrationsProps> = ({
|
||||
{providers?.map(({ name, displayName, description }) => (
|
||||
<IntegrationCard
|
||||
key={name}
|
||||
icon={name}
|
||||
title={displayName || name}
|
||||
description={description}
|
||||
/>
|
||||
|
@ -1,7 +1,9 @@
|
||||
import { VFC } from 'react';
|
||||
import { Box, styled, Typography } from '@mui/material';
|
||||
import { IntegrationIcon } from '../IntegrationIcon/IntegrationIcon';
|
||||
|
||||
interface IIntegrationCardProps {
|
||||
icon: string;
|
||||
title: string;
|
||||
description?: string;
|
||||
isEnabled?: boolean;
|
||||
@ -9,13 +11,19 @@ interface IIntegrationCardProps {
|
||||
}
|
||||
|
||||
const StyledBox = styled(Box)(({ theme }) => ({
|
||||
padding: theme.spacing(2),
|
||||
padding: theme.spacing(3),
|
||||
borderRadius: `${theme.shape.borderRadiusMedium}px`,
|
||||
border: `1px solid ${theme.palette.divider}`,
|
||||
boxShadow: theme.shadows[1],
|
||||
}));
|
||||
|
||||
const StyledHeader = styled(Typography)(({ theme }) => ({
|
||||
display: 'flex',
|
||||
alignItems: 'center',
|
||||
marginBottom: theme.spacing(2),
|
||||
}));
|
||||
|
||||
export const IntegrationCard: VFC<IIntegrationCardProps> = ({
|
||||
icon,
|
||||
title,
|
||||
description,
|
||||
isDeprecated,
|
||||
@ -23,7 +31,9 @@ export const IntegrationCard: VFC<IIntegrationCardProps> = ({
|
||||
}) => {
|
||||
return (
|
||||
<StyledBox>
|
||||
<Typography variant="h3">{title}</Typography>
|
||||
<StyledHeader variant="h3">
|
||||
<IntegrationIcon name={icon as string} /> {title}
|
||||
</StyledHeader>
|
||||
<Typography variant="body1">{description}</Typography>
|
||||
</StyledBox>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user