forked from zhongyidian/food-add-edu
feat: 引入 yuxiang-kit 课程组件源码与运行时
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
77742d5b02
commit
3995656175
41 files changed
+2752
No files matched your search
@@ -0,0 +1,23 @@
|
||||
import { forwardRef } from "react";
|
||||
import { cn } from "@/lib/cn";
|
||||
import styles from "./Button.module.css";
|
||||
import type { ButtonProps } from "./Button.types";
|
||||
|
||||
export const Button = forwardRef<HTMLButtonElement, ButtonProps>(
|
||||
(
|
||||
{ children, className, variant = "primary", size = "md", ...props },
|
||||
ref,
|
||||
) => {
|
||||
return (
|
||||
<button
|
||||
ref={ref}
|
||||
className={cn(styles.button, styles[variant], styles[size], className)}
|
||||
{...props}
|
||||
>
|
||||
<span className={styles.content}>{children}</span>
|
||||
</button>
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
Button.displayName = "Button";
|
||||
Reference in new issue
Block a user