Enforce front project structure through ESLINT (#7863)

Fixes: https://github.com/twentyhq/twenty/issues/7329
This commit is contained in:
Charles Bochet
2024-10-20 20:20:19 +02:00
committed by GitHub
parent f801f3aa9f
commit eccf0bf8ba
260 changed files with 500 additions and 290 deletions

View File

@ -0,0 +1,43 @@
import styled from '@emotion/styled';
import { Card } from '@/ui/layout/card/components/Card';
type EventCardProps = {
children: React.ReactNode;
isOpen: boolean;
};
const StyledCardContainer = styled.div`
align-items: flex-start;
display: flex;
flex-direction: column;
flex-grow: 1;
gap: ${({ theme }) => theme.spacing(2)};
width: 400px;
padding: ${({ theme }) => theme.spacing(2)} 0px
${({ theme }) => theme.spacing(1)} 0px;
`;
const StyledCard = styled(Card)`
background: ${({ theme }) => theme.background.secondary};
border: 1px solid ${({ theme }) => theme.border.color.medium};
border-radius: ${({ theme }) => theme.border.radius.md};
display: flex;
padding: ${({ theme }) => theme.spacing(2)};
flex-direction: column;
align-items: flex-start;
gap: ${({ theme }) => theme.spacing(2)};
justify-content: center;
align-self: stretch;
`;
export const EventCard = ({ children, isOpen }: EventCardProps) => {
return (
isOpen && (
<StyledCardContainer>
<StyledCard fullWidth>{children}</StyledCard>
</StyledCardContainer>
)
);
};