@@ -33,12 +33,12 @@ const PreCardLabel = styled(H6).attrs({ as: "h3" })``;
3333
3434const CardButtonContainer = styled . div `
3535 display: grid;
36- grid-template-columns: 4fr 1fr;
36+ grid-template-columns: 8fr 1fr;
3737 margin-top: var(--spacing-s);
3838 align-items: center;
3939 position: relative;
4040
41- @media (max-width: ${ breakpoint . s } ) {
41+ @media (max-width: ${ breakpoint . m } ) {
4242 grid-template-columns: 1fr;
4343 }
4444` ;
@@ -49,30 +49,35 @@ const CardContainer = styled.div`
4949 align-items: flex-start;
5050 grid-template-columns: 1fr;
5151
52- @media (min-width: ${ breakpoint . s } ) {
53- grid-template-columns: 163px 4fr 2fr;
52+ @media (min-width: ${ breakpoint . m } ) {
53+ grid-template-columns: 163px 6fr 2fr;
5454 gap: var(--spacing-xs);
5555 }
5656` ;
5757
5858const PaddedCell = styled . div `
59- &:first-of-type {
60- padding: var(--spacing-s);
61- }
62-
6359 padding: var(--spacing-m) 0;
6460
6561 @media (min-width: ${ breakpoint . s } ) {
6662 display: flex;
6763 flex-direction: column;
68- gap: var(--spacing-s );
64+ gap: var(--spacing-xs );
6965 }
7066` ;
7167
72- const Image = styled . img `
68+ const ExtraPaddedCell = styled ( PaddedCell ) `
69+ padding: var(--spacing-s);
70+ ` ;
71+
72+ const ImageCell = styled . div < { $src : string } > `
73+ background-image: url(${ ( props ) => props . $src } );
7374 width: 100%;
74- max-height: 200px;
75- object-fit: cover;
75+ height: 150px;
76+ background-size: cover;
77+
78+ @media (min-width: ${ breakpoint . m } ) {
79+ height: 100%;
80+ }
7681` ;
7782
7883const Name = styled . div `
@@ -89,15 +94,16 @@ const Name = styled.div`
8994const MaxPersonsContainer = styled . div `
9095 display: flex;
9196 align-items: center;
92- font-size: var(--fontsize-body-m);
93-
94- svg {
95- margin-right: var(--spacing-2-xs);
96- }
97+ gap: var(--spacing-xs);
98+ font-size: var(--fontsize-body-s);
99+ padding-bottom: var(--spacing-2-xs);
97100` ;
98101
99102const DeleteButton = styled ( MediumButton ) `
100- margin-right: var(--spacing-s);
103+ white-space: nowrap;
104+ margin: var(--spacing-s) var(--spacing-s) var(--spacing-s) 0;
105+ align-self: flex-end;
106+ justify-self: flex-start;
101107` ;
102108
103109const ArrowContainer = styled . div `
@@ -107,8 +113,11 @@ const ArrowContainer = styled.div`
107113 right: var(--spacing-m);
108114 bottom: var(--spacing-m);
109115
110- @media (min-width: ${ breakpoint . s } ) {
116+ @media (min-width: ${ breakpoint . m } ) {
111117 position: static;
118+ flex-direction: column;
119+ gap: var(--spacing-s);
120+ justify-self: flex-end;
112121 }
113122` ;
114123
@@ -167,32 +176,30 @@ const ReservationUnitCard = ({
167176 ) : null }
168177 < CardButtonContainer >
169178 < CardContainer >
170- < Image src = { getMainImage ( reservationUnit ) ?. mediumUrl } alt = "" />
171- < PaddedCell >
179+ < ImageCell $ src= { getMainImage ( reservationUnit ) ?. mediumUrl } />
180+ < ExtraPaddedCell >
172181 < Name > { getTranslation ( reservationUnit , "name" ) } </ Name >
173182 < MaxPersonsContainer >
174183 { reservationUnit . maxPersons && (
175184 < >
176- < IconGroup aria-hidden />
185+ < IconGroup aria-hidden size = "s" />
177186 { t ( "reservationUnitCard:maxPersons" , {
178187 count : reservationUnit . maxPersons ,
179188 } ) }
180189 </ >
181190 ) }
182191 </ MaxPersonsContainer >
183- </ PaddedCell >
184- < PaddedCell >
185- < DeleteButton
186- variant = "supplementary"
187- iconLeft = { < IconCross aria-hidden /> }
188- size = "small"
189- onClick = { ( ) => {
190- onDelete ( reservationUnit ) ;
191- } }
192- >
193- { t ( "reservationUnitList:buttonRemove" ) }
194- </ DeleteButton >
195- </ PaddedCell >
192+ </ ExtraPaddedCell >
193+ < DeleteButton
194+ variant = "supplementary"
195+ iconLeft = { < IconCross aria-hidden /> }
196+ size = "small"
197+ onClick = { ( ) => {
198+ onDelete ( reservationUnit ) ;
199+ } }
200+ >
201+ { t ( "reservationUnitList:buttonRemove" ) }
202+ </ DeleteButton >
196203 </ CardContainer >
197204 < ArrowContainer >
198205 < Circle passive = { first } >
0 commit comments