Skip to content

Commit

Permalink
feat: payment component
Browse files Browse the repository at this point in the history
  • Loading branch information
dlcastillop committed Mar 18, 2023
1 parent b4317da commit bdc4b98
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 13 deletions.
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
rel="stylesheet"
/>
</head>
<body>
<body data-theme="dark">
<div id="root"></div>
<script type="module" src="/src/main.jsx"></script>
</body>
Expand Down
26 changes: 14 additions & 12 deletions src/App.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,22 +17,24 @@ const App = () => {
{Config.Social.map(
(i) =>
i.link != "" && (
<SocialMedia
value={i.value}
href={i.link}
key={i.label}
></SocialMedia>
<SocialMedia value={i.value} href={i.link} key={i.label} />
)
)}
</section>

<section>
<Payment
img={Config.Payments[0].img}
label={Config.Payments[0].label}
id={Config.Payments[0].id}
value={Config.Payments[0].value}
/>
<section className="flex flex-col gap-6 mt-6">
{Config.Payments.map(
(i) =>
i.value != "" && (
<Payment
img={i.img}
label={i.label}
id={i.id}
value={i.value}
key={i.label}
/>
)
)}
</section>
</div>
);
Expand Down
25 changes: 25 additions & 0 deletions src/components/Payment.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
const Payment = ({ img, label, id, value }) => {
const copyEvent = () => {};

return (
<div className="flex justify-between items-center p-4 h-14 sm:mx-0 mx-1 bg-neutral shadow-md rounded-full transition ease-in-out delay-150 sm:hover:scale-105 duration-300">
<img src={img} alt={label + " logo"} className="w-8 h-8" />
<p className="font-normal text-base text-neutral-content mx-2 flex-grow text-center pl-9">
{label}
</p>
<div>
<button
className="btn btn-sm bg-neutral border-0 text-neutral-content hover:bg-neutral-focus"
onClick={copyEvent}
>
<i className="bx bx-copy text-lg"></i>
</button>
<button className="btn btn-sm bg-neutral border-0 text-neutral-content hover:bg-neutral-focus">
<i className="bx bx-qr text-lg"></i>
</button>
</div>
</div>
);
};

export default Payment;

0 comments on commit bdc4b98

Please sign in to comment.