更新依赖项及历史人物相关内容资源
- 更新 package.json 和 package-lock.json 中的依赖项 - 新增/更新陈云、黄炎培、鲁迅、孙中山的音频文件 - 新增场景和组件的图片资源 - 清理未使用的音频和图片文件 - 优化多个组件和页面的实现逻辑
This commit is contained in:
1 parent
b1d55b9464
commit
e0fa47d21a
629 files changed
+24390
-2991
No files matched your search
@@ -0,0 +1,46 @@
|
||||
import { cn } from '@/lib/utils'
|
||||
import { forwardRef } from 'react'
|
||||
import type { BaseButtonProps } from './button.types'
|
||||
|
||||
export type FlipActionButtonProps = Omit<BaseButtonProps, 'variant'>
|
||||
|
||||
/**
|
||||
* 通用动作按钮(建议配合场景自定义 children)
|
||||
* - 平面风格,结构简单
|
||||
* - 强按下反馈(缩放/压暗/内描边)
|
||||
*/
|
||||
const FlipActionButton = forwardRef<HTMLButtonElement, FlipActionButtonProps>(
|
||||
(
|
||||
{ children, className = '', disabled = false, loading = false, type = 'button', ...props },
|
||||
ref
|
||||
) => {
|
||||
return (
|
||||
<button
|
||||
ref={ref}
|
||||
type={type as 'button' | 'submit' | 'reset' | undefined}
|
||||
className={cn(
|
||||
'inline-flex items-center justify-center gap-3',
|
||||
'rounded-[999px] px-7 py-3',
|
||||
'text-white text-4xl font-bold',
|
||||
'bg-[#B08D6A] hover:bg-[#bf9973]',
|
||||
'transition-[transform,filter,background-color] duration-150',
|
||||
'active:scale-[0.96] active:brightness-95',
|
||||
'shadow-sm',
|
||||
'focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white/70 focus-visible:ring-offset-2 focus-visible:ring-offset-black/40',
|
||||
'disabled:opacity-50 disabled:pointer-events-none',
|
||||
// 内描边:更像“按下”的反馈
|
||||
'active:shadow-[inset_0_0_0_2px_rgba(255,255,255,.20)]',
|
||||
className
|
||||
)}
|
||||
disabled={disabled || loading}
|
||||
{...props}
|
||||
>
|
||||
{loading ? '加载中...' : children}
|
||||
</button>
|
||||
)
|
||||
}
|
||||
)
|
||||
|
||||
FlipActionButton.displayName = 'FlipActionButton'
|
||||
|
||||
export default FlipActionButton
|
||||
@@ -1,2 +1,4 @@
|
||||
export * from './button'
|
||||
export * from './button.types'
|
||||
export { default as FlipActionButton } from './FlipActionButton'
|
||||
export type { FlipActionButtonProps } from './FlipActionButton'
|
||||
Reference in new issue
Block a user