Home / Function/ IntegrationCard() — supabase Function Reference

IntegrationCard() — supabase Function Reference

Architecture documentation for the IntegrationCard() function in IntegrationCard.tsx from the supabase codebase.

Entity Profile

Dependency Diagram

graph TD
  a8b0d122_606c_776f_0aa7_a4fa46d11298["IntegrationCard()"]
  9f287a7b_e14d_5a58_d3e7_e68fdd750516["getIntegrationType()"]
  a8b0d122_606c_776f_0aa7_a4fa46d11298 -->|calls| 9f287a7b_e14d_5a58_d3e7_e68fdd750516
  a965cb05_8eb4_bb56_842a_7388ca131a50["getIntegrationTypeIcon()"]
  a8b0d122_606c_776f_0aa7_a4fa46d11298 -->|calls| a965cb05_8eb4_bb56_842a_7388ca131a50
  961184dc_9929_f906_f6a2_6e1432c44d7c["getIntegrationTypeLabel()"]
  a8b0d122_606c_776f_0aa7_a4fa46d11298 -->|calls| 961184dc_9929_f906_f6a2_6e1432c44d7c
  23223922_1c87_cbb8_adb8_3a48c44dcd0b["getIntegrationTypeDescription()"]
  a8b0d122_606c_776f_0aa7_a4fa46d11298 -->|calls| 23223922_1c87_cbb8_adb8_3a48c44dcd0b
  style a8b0d122_606c_776f_0aa7_a4fa46d11298 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/studio/components/interfaces/Auth/ThirdPartyAuthForm/IntegrationCard.tsx lines 177–226

export const IntegrationCard = ({
  integration,
  canUpdateConfig,
  onDelete,
}: IntegrationCardProps) => {
  let type = getIntegrationType(integration)

  if (type === 'custom') {
    return null
  }

  return (
    <>
      <div className="bg-surface-100 border overflow-hidden shadow px-5 py-4 flex flex-row first:rounded-t-md last:rounded-b-md space-x-4">
        <div className="py-1">
          <Image src={getIntegrationTypeIcon(type)} width={21} height={21} alt={`${type} icon`} />
        </div>
        <div className="flex flex-col flex-0 overflow-y-auto w-full gap-y-4">
          <div className="text-sm flex flex-col">
            <span className="text-foreground">{getIntegrationTypeLabel(type)}</span>
            <div className="text-foreground-lighter">{getIntegrationTypeDescription(type)}</div>
          </div>

          <IntegrationTypeContent type={type} integration={integration} />
          <div>
            {/* TODO: this should be a configure integration where it would show the sheet and the user can disable or delete the integration
              but there's no "edit integration" endpoing for now. */}
            <Button type="danger" disabled={!canUpdateConfig} onClick={() => onDelete()}>
              Delete integration
            </Button>
          </div>
        </div>
        <div className="flex-1">
          {true ? (
            <Badge className="space-x-1" variant="success">
              <div className="h-3.5 w-3.5 bg-brand rounded-full flex justify-center items-center">
                <Check className="h-2 w-2 text-background-overlay" strokeWidth={6} />
              </div>
              <span>Enabled</span>
            </Badge>
          ) : (
            <Badge variant="warning">
              <span>Disabled</span>
            </Badge>
          )}
        </div>
      </div>
    </>
  )
}

Subdomains

Frequently Asked Questions

What does IntegrationCard() do?
IntegrationCard() is a function in the supabase codebase.
What does IntegrationCard() call?
IntegrationCard() calls 4 function(s): getIntegrationType, getIntegrationTypeDescription, getIntegrationTypeIcon, getIntegrationTypeLabel.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free