-
-
Notifications
You must be signed in to change notification settings - Fork 158
Expand file tree
/
Copy pathAboutPagesCard.tsx
More file actions
40 lines (34 loc) · 890 Bytes
/
AboutPagesCard.tsx
File metadata and controls
40 lines (34 loc) · 890 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import styled from "styled-components"
import { Card } from "../bootstrap"
import { FC, PropsWithChildren } from "react"
const StyledHeader = styled(Card.Header)`
transform: translate(0);
&:first-child {
border-radius: 10px 10px 0 0;
}
@media (min-width: 48em) {
width: max-content;
margin-bottom: -1rem;
transform: translate(-3rem, -40%);
&:first-child {
border-radius: 0 5rem 5rem 0;
}
}
`
const AboutPagesCard: FC<PropsWithChildren<{ title: string }>> = ({
title,
children
}) => {
return (
<Card className="mx-sm-5 mx-xs-3 my-5 rounded-3 bg-white">
<StyledHeader
as="h1"
className="bg-secondary text-white overflow-hidden fs-sm-1 pt-2 pt-sm-3 pb-1 pb-sm-3 ps-4 ps-sm-5 pe-5"
>
{title}
</StyledHeader>
<Card.Body>{children}</Card.Body>
</Card>
)
}
export default AboutPagesCard