Skip to content

Commit c0f6d92

Browse files
committed
chore(components): add two components
1 parent 248f2eb commit c0f6d92

File tree

2 files changed

+75
-0
lines changed

2 files changed

+75
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
import { Button } from "@progress/kendo-react-buttons";
2+
3+
type BackgroundImageProps = {
4+
title: string;
5+
subtitle: string;
6+
buttonText: string;
7+
img: string;
8+
};
9+
10+
export const BackgroundImage = (props: BackgroundImageProps) => {
11+
const { img, title, subtitle, buttonText } = props;
12+
13+
return (
14+
<section
15+
className="k-h-full k-w-full k-bg-cover"
16+
style={{
17+
backgroundImage: `url(${img})`,
18+
backgroundColor: "",
19+
}}
20+
>
21+
<div className="k-w-full k-h-full k-d-flex k-flex-col k-justify-content-center k-align-items-center" style={{
22+
backgroundColor: "rgba(0, 0, 0, 0.3)"
23+
}}>
24+
<div className="k-text-center k-text-white">
25+
<h1
26+
className="k-h1 k-font-bold"
27+
style={{
28+
marginTop: "190px",
29+
}}
30+
>
31+
{title}
32+
</h1>
33+
<p className="k-font-size-lg k-mb-4 k-font-bold">{subtitle}</p>
34+
<Button themeColor="primary" className="k-mb-4">
35+
{buttonText}
36+
</Button>
37+
</div>
38+
</div>
39+
</section>
40+
);
41+
};
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
type OrderedImgTextProps = {
2+
title: string;
3+
subtitle: string;
4+
contentText: string;
5+
img: string;
6+
order: string;
7+
};
8+
9+
export const OrderedImgText = (props: OrderedImgTextProps) => {
10+
const { title, subtitle, contentText, img, order } = props;
11+
12+
return (
13+
<section className="k-d-flex k-flex-wrap k-flex-row k-w-full k-h-full k-justify-content-center k-align-items-center k-gap-5px">
14+
<span
15+
className={`k-w-full k-h-full k-order-${order} k-rounded-lg`}
16+
style={{
17+
backgroundImage: `url(${img})`,
18+
backgroundSize: "cover",
19+
flex: "0 0 70%",
20+
}}
21+
></span>
22+
<div
23+
className="k-text-center"
24+
style={{
25+
flex: "0 0 30%",
26+
}}
27+
>
28+
<div className="k-h2 k-font-bold k-text-black">{title}</div>
29+
<div className="k-font-size-xl k-p-5">{subtitle}</div>
30+
<span className="k-font-size-md">{contentText}</span>
31+
</div>
32+
</section>
33+
);
34+
};

0 commit comments

Comments
 (0)