Files
supabase/apps/design-system/components/homepage-svg-handler.tsx
Ivan Vasilov 1b1d748ed6 fix: Fix missing images in the design-system app (#27953)
Add images for all themes. Fix the links to the images.
2024-07-12 12:53:29 +02:00

21 lines
489 B
TypeScript

'use client'
import SVG from 'react-inlinesvg'
import { useTheme } from 'next-themes'
import { cn } from 'ui'
const HomepageSvgHandler = ({ name, className }: { name: string; className?: string }) => {
const { resolvedTheme } = useTheme()
return (
<div>
<SVG
className={cn('h-32 w-auto', className)}
src={`${process.env.NEXT_PUBLIC_BASE_PATH}/img/design-system-marks/${name}--${resolvedTheme}.svg`}
/>
</div>
)
}
export { HomepageSvgHandler }