Skip to content

Commit

Permalink
Merge pull request #310 from IT-Start-Gjovik/buttonComponent
Browse files Browse the repository at this point in the history
Button component
  • Loading branch information
Mosazghi authored Feb 10, 2024
2 parents 76f7754 + 6b8b731 commit 5f7407c
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/(site)/for-bedrifter/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import ListIcon from '@/components/listIcon/listIcon';
import { InboxIcon, MapIcon, PhoneIcon } from '@heroicons/react/20/solid';
import dynamic from 'next/dynamic';
import Image from 'next/image';
import Button from '@/components/Button/button';

const Map = dynamic(() => import('@/components/map/map'), { ssr: false, loading: () => <Spinner /> });
export default function ForCompany() {
Expand Down
22 changes: 22 additions & 0 deletions components/Button/button.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
import Link from "next/link";

interface ButtonProps {
text: string;
link: string;
adaptiv?: boolean;
}

export default function Button({ text, link, adaptiv }: ButtonProps) {
return (
<Link href={link}>
<button
className={`ring-2 ring-[#B2C51F] text-white hover:text-[#B2C51F] bg-[#B2C51F]
hover:bg-transparent hover:ease-out hover:duration-300
active:ring-black active:text-black active:duration-0
px-[27px] py-[8px] rounded-full font-bold
${adaptiv ? 'w-full' : 'w-auto'}`}>
{text}
</button>
</Link>
);
}

0 comments on commit 5f7407c

Please sign in to comment.