Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

546 B
Raw Blame
import type { ImgHTMLAttributes } from 'react'

import { BASE_PATH } from '@/lib/constants'

interface RegionFlagProps extends Omit<ImgHTMLAttributes<HTMLImageElement>, 'src'> {
  region: string
}

export const RegionFlag = ({
  alt = '',
  'aria-hidden': ariaHidden,
  className,
  region,
  ...props
}: RegionFlagProps) => (
  <img
    alt={alt}
    aria-hidden={ariaHidden ?? alt === ''}
    className={`rounded-xs border border-foreground-muted/20 ${className ?? ''}`}
    src={`${BASE_PATH}/img/regions/${region}.svg`}
    {...props}
  />
)