feat: Library (#34294)
* Copy the design-system app into a new one for ui-library. * Remove unneeded content. * Add supabase config. * Cleanup the css. * Add bunch of packages. * Cleanup the registry. * Regenerate the registry. * Add needed components for documenting components. * Add the pages for the components. * Fix the RegistryBlock. * Various fixes. * Add a turbo definition for ui-library. * Rename Remix to React Router. * Reorder the pages for all frameworks. * Remove the bottom pager. * Fix the pages and command menu. * Various fixes. * Minor fixes. * Add ai editor rules. * Various fixes. * Add local supabase env vars. * Try to fix a package error. * Bunch of various fixes. * Fix lint errors.
This commit is contained in:
20
apps/ui-library/components/homepage-svg-handler.tsx
Normal file
20
apps/ui-library/components/homepage-svg-handler.tsx
Normal file
@@ -0,0 +1,20 @@
|
||||
'use client'
|
||||
|
||||
import { useTheme } from 'next-themes'
|
||||
import SVG from 'react-inlinesvg'
|
||||
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 }
|
||||
Reference in New Issue
Block a user