diff --git a/components/shared/EventCard.tsx b/components/shared/EventCard.tsx index 3953c49f..b9025935 100644 --- a/components/shared/EventCard.tsx +++ b/components/shared/EventCard.tsx @@ -7,6 +7,7 @@ import Link from 'next/link'; import { AddressContainer, AddressIcon, + CircularImageContainer, ClockIcon, Container, EventImage, @@ -86,12 +87,15 @@ const EventCard = ({ - Event image icon + {/* make the image circular */} + + Event image icon + {eventData.name} diff --git a/components/shared/LongEventCard.tsx b/components/shared/LongEventCard.tsx index e2cb528b..887fb274 100644 --- a/components/shared/LongEventCard.tsx +++ b/components/shared/LongEventCard.tsx @@ -30,7 +30,7 @@ const LongEventCard = ({ Event image icon` line-height: ${props => props.ratio * 22}px; ${Overflow}; `; + +// a container that makes the image within it circular +export const CircularImageContainer = styled.div<{ + ratio: number; + size: number; +}>` + border-radius: 50%; + // width and height are calculated based on the ratio prop + width: ${props => props.ratio * props.size} px; + height: ${props => props.ratio * props.size} px; + + ${Overflow}; +`;