@@ -3,7 +3,6 @@ import classNames from 'classnames';
3
3
import Image from 'next/image' ;
4
4
import { FLAT_CARD_IMAGE } from 'common/constants/testIDs' ;
5
5
import { getPlaceholder } from 'common/utils/next-utils' ;
6
- import styles from './FlatCard.module.css' ;
7
6
8
7
FlatCard . propTypes = {
9
8
button : element ,
@@ -28,16 +27,19 @@ function FlatCard({ button: Button, children, className, header, image }) {
28
27
29
28
return (
30
29
< article
31
- className = { classNames ( styles . FlatCard , className , {
32
- [ styles . cardWithImage ] : hasImage ,
30
+ className = { classNames ( 'box-border my-6 mx-4 relative max-w-[400px]' , className , {
31
+ 'pt-14' : hasImage ,
33
32
} ) }
34
33
>
35
- < div className = { styles . borderContainer } >
36
- { header && < div className = { styles . header } > { header } </ div > }
34
+ < div className = "p-8 border-4 border-solid border-themePrimary" >
35
+ { header && < div className = "order-2 text-center" > { header } </ div > }
37
36
38
37
{ hasImage && (
39
- < div className = { styles . rowCenter } >
40
- < div data-testid = { FLAT_CARD_IMAGE } className = { styles . imageWrapper } >
38
+ < div className = "flex justify-center" >
39
+ < div
40
+ data-testid = { FLAT_CARD_IMAGE }
41
+ className = "border-solid border-themePrimary border-[3px] order-1 absolute -top-4 h-52 [&>img]:object-cover"
42
+ >
41
43
< Image
42
44
src = { image . source }
43
45
alt = { image . alt ?? '' }
@@ -50,11 +52,15 @@ function FlatCard({ button: Button, children, className, header, image }) {
50
52
</ div >
51
53
) }
52
54
53
- { header && < hr className = { styles . divider } /> }
55
+ { header && < hr className = "w-10/12 border-solid border-themePrimary" /> }
54
56
55
- < div className = { styles . children } > { children } </ div >
57
+ < div > { children } </ div >
56
58
57
- { Button && < div className = { styles . flatCardButton } > { Button } </ div > }
59
+ { Button && (
60
+ < div className = "text-center absolute left-0 right-0 -bottom-7 [&>button]:hover:bg-white [&>button]:hover:text-themeSecondary [&>button]:focus-visible:text-themePrimary [&>button]:focus-visible:bg-white [&>a]:hover:bg-white [&>a]:hover:text-themeSecondary [&>a]:focus-visible:bg-white [&>a]:focus-visible:text-themeSecondary " >
61
+ { Button }
62
+ </ div >
63
+ ) }
58
64
</ div >
59
65
</ article >
60
66
) ;
0 commit comments