Skip to content

UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.

🐛 fix: small fixes

Dillion Verma56d0ed14db98
diff --git a/app/(docs)/components/[slug]/page.tsx b/app/(docs)/components/[slug]/page.tsx
index 91a6ed14..471cf237 100644
--- a/app/(docs)/components/[slug]/page.tsx
+++ b/app/(docs)/components/[slug]/page.tsx
@@ -97,8 +97,13 @@ export default async function Component({ params }: Props) {
const toc = await getTableOfContents(component.body.raw);
return (
- <main className="relative py-6 lg:gap-10 lg:py-8 xl:grid xl:grid-cols-[1fr_300px]">
- <div className="mx-auto w-full min-w-0">
+ <main
+ className={cn(
+ "relative py-6 lg:gap-10 lg:py-8 xl:grid ",
+ "xl:grid-cols-[1fr_300px]",
+ )}
+ >
+ <div className="mx-auto w-full">
{/* Breadcrumb */}
<div className="mb-4 flex items-center space-x-1 text-sm text-muted-foreground">
<Link
@@ -152,21 +157,7 @@ export default async function Component({ params }: Props) {
</div>
</div>
- <div className="flex flex-col gap-4 pt-8">
- {/* {component.video && (
- <div className="flex md:hidden overflow-hidden relative rounded-xl border dark:border-slate-800 md:p-8 justify-center items-center flex-col max-w-[65ch]">
- <video
- src={component.video}
- autoPlay
- loop
- muted
- playsInline
- className="relative -bottom-1 aspect-video" // needed because random black line at bottom of video
- />
- </div>
- )} */}
- <Mdx code={component.body.code} />
- </div>
+ <Mdx code={component.body.code} />
</div>
{component.toc && (
@@ -178,6 +169,7 @@ export default async function Component({ params }: Props) {
</div>
</div>
)}
+
<script
type="application/ld+json"
dangerouslySetInnerHTML={{
diff --git a/components/component-wrapper.tsx b/components/component-wrapper.tsx
index 04e45000..a7f9344b 100644
--- a/components/component-wrapper.tsx
+++ b/components/component-wrapper.tsx
@@ -8,7 +8,7 @@ const ComponentWrapper = ({ className, children }: ComponentWrapperProps) => {
return (
<div
className={cn(
- "not-prose relative flex max-w-[65ch] flex-col items-center justify-center rounded-xl border p-8 backdrop-blur-xl md:p-20",
+ "not-prose max-w-screen relative flex flex-col items-center justify-center rounded-xl border p-8 backdrop-blur-xl md:p-20",
className,
)}
>
diff --git a/registry/components/example/magic-card-demo.tsx b/registry/components/example/magic-card-demo.tsx
index 65cd7d28..fbe53a83 100644
--- a/registry/components/example/magic-card-demo.tsx
+++ b/registry/components/example/magic-card-demo.tsx
@@ -10,7 +10,10 @@ export default function MagicCardWithGradient() {
"flex h-[500px] w-full flex-col gap-4 lg:h-[250px] lg:flex-row"
}
>
- <MagicCard className="flex w-full cursor-pointer flex-col items-center justify-center overflow-hidden p-20 shadow-2xl">
+ <MagicCard
+ borderWidth={3}
+ className="flex w-full cursor-pointer flex-col items-center justify-center overflow-hidden p-20 shadow-2xl"
+ >
<p className="z-10 whitespace-nowrap text-4xl font-medium text-gray-800 dark:text-gray-200">
Magic
</p>
diff --git a/registry/components/magicui/globe.tsx b/registry/components/magicui/globe.tsx
index b927192c..7b155d5c 100644
--- a/registry/components/magicui/globe.tsx
+++ b/registry/components/magicui/globe.tsx
@@ -1,7 +1,7 @@
import { cn } from "@/lib/utils";
import createGlobe, { COBEOptions } from "cobe";
import { useCallback, useEffect, useRef } from "react";
-import { config, useSpring } from "react-spring";
+import { useSpring } from "react-spring";
const GLOBE_CONFIG: COBEOptions = {
width: 800,
@@ -100,7 +100,7 @@ export default function Globe({
return (
<div
className={cn(
- "absolute inset-0 aspect-[1/1] w-full max-w-[600px]",
+ "absolute inset-0 mx-auto aspect-[1/1] w-full max-w-[600px]",
className,
)}
>
diff --git a/registry/components/magicui/magic-card.tsx b/registry/components/magicui/magic-card.tsx
index 5b36e892..8f835d79 100644
--- a/registry/components/magicui/magic-card.tsx
+++ b/registry/components/magicui/magic-card.tsx
@@ -149,30 +149,6 @@ interface MagicCardProps {
* */
size?: number;
- /**
- * ]@default "#475569"
- * @type string
- * @description
- * The border color of the card
- */
- borderColor?: string;
-
- /**
- * @default 1
- * @type number
- * @description
- * The border width of the card
- * */
- borderWidth?: number;
-
- /**
- * @default 16
- * @type number
- * @description
- * The border radius of the card
- * */
- borderRadius?: number;
-
/**
* @default true
* @type boolean
@@ -212,7 +188,6 @@ const MagicCard = ({
className,
children,
size = 600,
- borderWidth = 1,
spotlight = true,
spotlightColor = "rgba(120,119,198,0.1)",
isolated = true,
@@ -221,28 +196,29 @@ const MagicCard = ({
return (
<div
{...props}
- className={cn("relative h-full w-full rounded-lg", className)}
+ className={cn("relative h-full w-full rounded-2xl", className)}
style={
{
- "--border-width": `${borderWidth}px`,
"--mask-size": `${size}px`,
"--spotlight-color": `${spotlightColor}`,
} as CSSProperties
}
>
{/* Border */}
- <div className="pointer-events-none absolute inset-0 -z-[3] h-full w-full rounded-lg bg-gray-300 bg-[radial-gradient(var(--mask-size)_circle_at_var(--mouse-x)_var(--mouse-y),#ffaa40_0,#9c40ff_50%,transparent_100%)] transition-opacity duration-500 dark:bg-gray-700 " />
+ <div className="pointer-events-none absolute inset-0 -z-[3] h-full w-full rounded-2xl bg-gray-300 bg-[radial-gradient(var(--mask-size)_circle_at_var(--mouse-x)_var(--mouse-y),#ffaa40_0,#9c40ff_50%,transparent_100%)] transition-opacity duration-500 dark:bg-gray-700 " />
{children}
{/* Background */}
- <div className={"absolute inset-[1px] -z-[2] rounded-lg bg-background"} />
+ <div
+ className={"absolute inset-[1px] -z-[2] rounded-2xl bg-background"}
+ />
{/* Spotlight */}
{spotlight && (
<div
className={
- "blur-xs pointer-events-none absolute left-0 top-0 -z-[1] h-full w-full rounded-lg bg-[radial-gradient(var(--mask-size)_circle_at_var(--mouse-x)_var(--mouse-y),var(--spotlight-color),transparent_40%)] transition-opacity duration-500"
+ "blur-xs pointer-events-none absolute left-0 top-0 -z-[1] h-full w-full rounded-2xl bg-[radial-gradient(var(--mask-size)_circle_at_var(--mouse-x)_var(--mouse-y),var(--spotlight-color),transparent_40%)] transition-opacity duration-500"
}
/>
)}