-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
80 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import clsx from 'clsx' | ||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' | ||
import Link from 'next/link' | ||
import type { FunctionComponent } from 'react' | ||
import type { IconProp } from '@fortawesome/fontawesome-svg-core' | ||
|
||
type Props = { | ||
href: string | ||
title: string | ||
width?: number | ||
height?: number | ||
rowStart?: number | ||
colStart?: number | ||
className?: string | ||
icon?: IconProp | ||
} | ||
|
||
const Endpoint: FunctionComponent<Props> = ({ className, href, title, children, width, height, rowStart, colStart, icon }) => { | ||
return ( | ||
<Link href={`/api/${href}`} passHref> | ||
<a | ||
className={clsx( | ||
'flex flex-col justify-end rounded-xl px-4 py-8 text-white hover:shadow-xl', | ||
className, | ||
)} | ||
style={{ | ||
gridColumn: typeof width !== 'undefined' && `span ${width} / span ${width}`, | ||
gridRow: typeof height !== 'undefined' && `span ${height} / span ${height}`, | ||
gridColumnStart: colStart, | ||
gridRowStart: rowStart, | ||
}} | ||
> | ||
{icon && ( | ||
<span> | ||
<FontAwesomeIcon icon={icon} fixedWidth className="p-4 mb-4 text-lg sm:text-xl lg:text-2xl rounded-full bg-white bg-opacity-10" /> | ||
</span> | ||
)} | ||
<h3 className="text-2xl font-bold sm:text-3xl lg:text-4xl">{title}</h3> | ||
<p className="mt-2 sm:mt-3 sm:text-lg">{children}</p> | ||
</a> | ||
</Link> | ||
) | ||
} | ||
|
||
export default Endpoint |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,7 @@ | ||
@tailwind base; | ||
@tailwind components; | ||
@tailwind utilities; | ||
@tailwind utilities; | ||
|
||
.gradient-fix { | ||
-webkit-box-decoration-break: clone; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f6cb38e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs: