UI Library for Design Engineers. Animated components and effects you can copy and paste into your apps. Free. Open Source.
fix: update shiny button props
Dillion Vermab2e234cb6cda
diff --git a/content/docs/components/shiny-button.mdx b/content/docs/components/shiny-button.mdxindex 54ad9ba6..9c15ee11 100644--- a/content/docs/components/shiny-button.mdx+++ b/content/docs/components/shiny-button.mdx@@ -42,10 +42,10 @@ npx magicui-cli add shiny-button## Props-| Prop | Type | Description | Default |-| --------- | ------ | --------------------------------------------- | -------------- |-| text | string | The text to display | "shiny button" |-| className | string | The class name to be applied to the component | |+| Prop | Type | Description | Default |+| --------- | --------------- | --------------------------------------------- | ------- |+| className | string | The class name to be applied to the component | |+| children | React.ReactNode | The content to be displayed inside the button | |## Creditsdiff --git a/registry/components/example/shiny-button-demo.tsx b/registry/components/example/shiny-button-demo.tsxindex e6c603df..7e3eb0ec 100644--- a/registry/components/example/shiny-button-demo.tsx+++ b/registry/components/example/shiny-button-demo.tsx@@ -1,5 +1,5 @@import ShinyButton from "@/components/magicui/shiny-button";export default function ShinyButtonDemo() {- return <ShinyButton text="Shiny Button" className="" />;+ return <ShinyButton>Shiny Button</ShinyButton>;}diff --git a/registry/components/magicui/shiny-button.tsx b/registry/components/magicui/shiny-button.tsxindex e1f13395..5c0ae1d6 100644--- a/registry/components/magicui/shiny-button.tsx+++ b/registry/components/magicui/shiny-button.tsx@@ -1,5 +1,6 @@"use client";+import React from "react";import { motion, type AnimationProps } from "framer-motion";import { cn } from "@/lib/utils";@@ -25,29 +26,27 @@ const animationProps = {},} as AnimationProps;interface ShinyButtonProps {- text: string;+ children: React.ReactNode;className?: string;}-const ShinyButton = ({- text = "shiny-button",- className,-}: ShinyButtonProps) => {+const ShinyButton = ({ children, className, ...props }: ShinyButtonProps) => {return (<motion.button{...animationProps}+ {...props}className={cn(- "relative rounded-lg px-6 py-2 font-medium backdrop-blur-xl transition-[box-shadow] duration-300 ease-in-out hover:shadow dark:bg-[radial-gradient(circle_at_50%_0%,hsl(var(--primary)/10%)_0%,transparent_60%)] dark:hover:shadow-[0_0_20px_hsl(var(--primary)/10%)]",+ "relative rounded-lg px-6 py-2 font-medium backdrop-blur-xl transition-shadow duration-300 ease-in-out hover:shadow dark:bg-[radial-gradient(circle_at_50%_0%,hsl(var(--primary)/10%)_0%,transparent_60%)] dark:hover:shadow-[0_0_20px_hsl(var(--primary)/10%)]",className,)}><span- className="relative block h-full w-full text-sm uppercase tracking-wide text-[rgb(0,0,0,65%)] dark:font-light dark:text-[rgb(255,255,255,90%)]"+ className="relative block size-full text-sm uppercase tracking-wide text-[rgb(0,0,0,65%)] dark:font-light dark:text-[rgb(255,255,255,90%)]"style={{maskImage:"linear-gradient(-75deg,hsl(var(--primary)) calc(var(--x) + 20%),transparent calc(var(--x) + 30%),hsl(var(--primary)) calc(var(--x) + 100%))",}}>- {text}+ {children}</span><spanstyle={{