chore(GlassCard): 添加 TypeScript 类型声明文件
- 定义 GlassCardProps 接口(variant, hoverable, glowing 等属性) - 定义 GlassTheme 类型(colors, blur, glow 主题配置) - 导出 GLASS_THEME 常量类型 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
38
src/components/GlassCard/index.d.ts
vendored
Normal file
38
src/components/GlassCard/index.d.ts
vendored
Normal file
@@ -0,0 +1,38 @@
|
||||
/**
|
||||
* GlassCard 组件类型声明
|
||||
*/
|
||||
|
||||
import { BoxProps } from '@chakra-ui/react';
|
||||
import React from 'react';
|
||||
|
||||
export interface GlassCardProps extends Omit<BoxProps, 'children'> {
|
||||
/** 变体: 'default' | 'elevated' | 'subtle' | 'transparent' */
|
||||
variant?: 'default' | 'elevated' | 'subtle' | 'transparent';
|
||||
/** 是否启用悬停效果 */
|
||||
hoverable?: boolean;
|
||||
/** 是否启用发光效果 */
|
||||
glowing?: boolean;
|
||||
/** 是否显示角落装饰 */
|
||||
cornerDecor?: boolean;
|
||||
/** 圆角: 'sm' | 'md' | 'lg' | 'xl' | '2xl' */
|
||||
rounded?: 'sm' | 'md' | 'lg' | 'xl' | '2xl';
|
||||
/** 内边距: 'none' | 'sm' | 'md' | 'lg' */
|
||||
padding?: 'none' | 'sm' | 'md' | 'lg';
|
||||
/** 子元素 */
|
||||
children?: React.ReactNode;
|
||||
}
|
||||
|
||||
export interface GlassTheme {
|
||||
colors: {
|
||||
gold: { 400: string; 500: string };
|
||||
bg: { deep: string; primary: string; elevated: string; surface: string };
|
||||
line: { subtle: string; default: string; emphasis: string };
|
||||
};
|
||||
blur: { sm: string; md: string; lg: string };
|
||||
glow: { sm: string; md: string };
|
||||
}
|
||||
|
||||
declare const GlassCard: React.ForwardRefExoticComponent<GlassCardProps & React.RefAttributes<HTMLDivElement>>;
|
||||
|
||||
export { GLASS_THEME } from './index';
|
||||
export default GlassCard;
|
||||
Reference in New Issue
Block a user