Files
supabase/apps/studio/components/layouts/IntegrationsLayout/VercelIntegrationWindowLayout.tsx
Ivan Vasilov 689b7d1fe6 fix: Switch to white icon for vercel when in dark mode (#22316)
* Fix the vercel icons to follow the black/white color scheme.

* Remove unused CSS classes.
2024-03-28 15:21:57 +01:00

37 lines
1.1 KiB
TypeScript

import { PropsWithChildren } from 'react'
import InlineSVG from 'react-inlinesvg'
import { useParams } from 'common'
import { BASE_PATH } from 'lib/constants'
import IntegrationWindowLayout from './IntegrationWindowLayout'
import { useIntegrationInstallationSnapshot } from 'state/integration-installation'
const VERCEL_ICON = (
<div className="bg-black shadow rounded p-1 w-8 h-8 flex justify-center items-center text-white">
<InlineSVG src={`${BASE_PATH}/img/icons/vercel-icon.svg`} title="Vercel Icon" className="w-4" />
</div>
)
const VercelIntegrationWindowLayout = ({ children }: PropsWithChildren<{}>) => {
const { externalId } = useParams()
const snapshot = useIntegrationInstallationSnapshot()
const title = externalId
? 'Supabase + Vercel Deploy Button'
: 'Supabase + Vercel Integration Marketplace Connector'
return (
<IntegrationWindowLayout
title={title}
integrationIcon={VERCEL_ICON}
loading={snapshot.loading}
docsHref="https://supabase.com/partners/integrations/vercel"
>
{children}
</IntegrationWindowLayout>
)
}
export default VercelIntegrationWindowLayout