mirror of
https://github.com/supabase/supabase.git
synced 2026-12-04 07:29:16 +00:00
27 lines
876 B
TypeScript
27 lines
876 B
TypeScript
import { BigQuery, ClickHouse, Database } from 'icons'
|
|
import { CircleHelpIcon, SnowflakeIcon } from 'lucide-react'
|
|
import type { ComponentType, SVGProps } from 'react'
|
|
|
|
import type { ReplicationDestinationType } from './ReplicationDiagram/Nodes.utils'
|
|
|
|
type DestinationIconComponent = ComponentType<SVGProps<SVGSVGElement> & { size?: string | number }>
|
|
|
|
const destinationIconByType: Record<ReplicationDestinationType, DestinationIconComponent> = {
|
|
BigQuery,
|
|
DuckLake: Database,
|
|
Snowflake: SnowflakeIcon,
|
|
ClickHouse,
|
|
Unknown: CircleHelpIcon,
|
|
}
|
|
|
|
interface DestinationIconProps extends Omit<SVGProps<SVGSVGElement>, 'strokeWidth'> {
|
|
type: ReplicationDestinationType
|
|
size?: string | number
|
|
}
|
|
|
|
export const DestinationIcon = ({ type, ...props }: DestinationIconProps) => {
|
|
const Icon = destinationIconByType[type]
|
|
|
|
return <Icon {...props} strokeWidth={1.5} />
|
|
}
|