LinkList/frontend/components/Links/index.tsx

35 lines
1015 B
TypeScript
Raw Normal View History

2021-04-05 11:00:14 -04:00
import React from "react";
2021-03-22 15:35:13 -04:00
2021-04-02 16:14:50 -04:00
export interface Link {
name: string;
2021-03-22 15:35:13 -04:00
url: string;
}
2021-04-05 11:00:14 -04:00
interface Props {
2021-03-22 15:35:13 -04:00
links: Link[];
}
export const Links: React.FC<Props> = ({ links }) => {
2021-03-22 15:35:13 -04:00
return (
2021-04-07 18:05:07 -04:00
<div className="text-s flex flex-col items-center w-full top-6 font-karla">
<img className="mb-3" src="images/csc-logo.png" alt="CSC Logo" width="100px" />
2021-03-22 15:35:13 -04:00
<h1 className="font-bold">@uwcsclub</h1>
<ul className="flex flex-col my-6 w-full">
2021-04-02 16:14:50 -04:00
{links.map(({ name, url }, i) => (
2021-04-07 18:05:07 -04:00
<li key={i} className="w-full flex justify-center">
2021-03-22 15:35:13 -04:00
<a
2021-04-07 18:05:07 -04:00
className="btn bg-gray-450 p-3 text-white font-karla font-bold text-center self-center my-1.5
hover:bg-white hover:text-black border-2 border-gray-800 transition duration-300 ease-in-out
w-11/12 sm:w-4/12 min-h-link"
2021-03-22 15:35:13 -04:00
href={url}
target="_blank"
rel="noreferrer"
>
2021-04-02 16:14:50 -04:00
{name}
2021-03-22 15:35:13 -04:00
</a>
</li>
))}
</ul>
</div>
);
};