Files
supabase/apps/studio/components/interfaces/Home/ExampleProject.tsx
T
Ivan VasilovandJoshen Lim 05a542ccea chore: Migrate all feather icons to lucide icons (#29038)
* Add lucide-react to docs (to make the autocomplete work).

* Migrate the docs app icons.

* Migrate the ui-patterns.

* Remove the old icons from ui package.

* Migrate the www app from react-feather icons.

* Migrate all of studio icons.

* Migrate the only component in design-system.

* Fix an old import in ui package. Revert an import in docs app.

* Fix some pages in www.

* Remove unneeded files used in generation of icons.

* Fix a prettier error.

* Fix more issues in www.

* Fix an issue in Log Date picker.

* Replace all string sizes with number sizes because the icons grew in some cases.

* Fix more imports in security page.

* Fix an extra import.

* Remove the size prop from all icons if they're in a button and they match the button size.

* Minor fixes for docs and www.

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2024-09-04 19:46:21 +08:00

65 lines
1.7 KiB
TypeScript

import { BASE_PATH } from 'lib/constants'
import { ChevronRight } from 'lucide-react'
import { useTheme } from 'next-themes'
import Link from 'next/link'
interface ExampleProjectProps {
framework: string
title: string
description: string
url: string
}
const ExampleProject = ({ framework, title, description, url }: ExampleProjectProps) => {
const { resolvedTheme } = useTheme()
return (
<Link href={url} target="_blank" rel="noreferrer">
<div
className={[
'group relative',
'border bg-surface-100 border-overlay',
'flex h-32 flex-row rounded-md p-4 hover:bg-overlay-hover',
'transition duration-150 ease-in-out',
].join(' ')}
>
<div className="mr-4 flex flex-col">
<img
className="transition-all group-hover:scale-110"
src={`${BASE_PATH}/img/libraries/${framework.toLowerCase()}${
['expo', 'nextjs'].includes(framework.toLowerCase())
? resolvedTheme?.includes('dark')
? '-dark'
: ''
: ''
}-icon.svg`}
alt={`${framework} logo`}
width={26}
height={26}
/>
</div>
<div className="w-4/5 space-y-2">
<h5 className="text-foreground">{title}</h5>
<p className="text-sm text-foreground-light">{description}</p>
</div>
<div
className="
absolute
right-4
top-3
text-foreground-lighter
transition-all
duration-200
group-hover:right-3
group-hover:text-foreground
"
>
<ChevronRight />
</div>
</div>
</Link>
)
}
export default ExampleProject