Skip to content

Commit 5073a5a

Browse files
committed
implement sponsorBtn component
1 parent 82c3695 commit 5073a5a

File tree

4 files changed

+21
-2
lines changed

4 files changed

+21
-2
lines changed

client/src/assets/sponsor.png

10.7 KB
Loading

client/src/components/Menu.jsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
import MenuItem from "./MenuItem";
22
import Socials from "./Socials";
3+
import SponsorBtn from "./SponsorBtn";
34

45
function Menu(){
56
return (
6-
<div className="w-52 h-56 rounded-xl bg-gradient-to-r from-slate-900 to-slate-700 absolute left-52 top-8 rounded-lg shadow-xl">
7+
<div className="w-52 h-71 rounded-xl bg-gradient-to-r from-slate-900 to-slate-700 absolute left-52 top-8 rounded-lg shadow-xl">
78
<MenuItem feat="Start Collaboration"></MenuItem>
89
<MenuItem feat="Start Chat"></MenuItem>
910
<MenuItem feat="Save as pdf"></MenuItem>
1011
<MenuItem feat="Save as png"></MenuItem>
12+
<SponsorBtn></SponsorBtn>
1113
<Socials></Socials>
1214
</div>
1315
);

client/src/components/Socials.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ function Socials(){
66
window.open(link, "_blank");
77
}
88
return (
9-
<div className="flex items-center justify-center mt-3">
9+
<div className="flex items-center justify-center my-3">
1010
<h1 className="text-white mr-2 cursor-pointer font-sans" onClick={clickHandler}>
1111
Built By{" "}
1212
<span className="font-mono text-emerald-300 hover:lowercase">

client/src/components/SponsorBtn.jsx

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
import sponsorImg from "../assets/sponsor.png";
2+
const link = "https://github.com/sponsors/apsinghdev?o=esb";
3+
4+
function clickHandler(){
5+
window.open(link, '_blank');
6+
}
7+
8+
function SponsorBtn(){
9+
return (
10+
<div className="flex items-center justify-center mt-3 cursor-pointer border-b border-dotted pb-2">
11+
<img src={sponsorImg} className="h-5 w-5 rounded"></img>
12+
<h1 className="text-white pl-1 cursor-pointer font-sans" onClick={clickHandler}>Sponsor</h1>
13+
</div>
14+
);
15+
}
16+
17+
export default SponsorBtn;

0 commit comments

Comments
 (0)