diff --git a/client/web/src/components/IconBtn.tsx b/client/web/src/components/IconBtn.tsx index 828d7355..ea3640b3 100644 --- a/client/web/src/components/IconBtn.tsx +++ b/client/web/src/components/IconBtn.tsx @@ -21,6 +21,7 @@ interface IconBtnProps extends Omit { iconClassName?: string; shape?: IconBtnShapeType; title?: string; + active?: boolean; } export const IconBtn: React.FC = React.memo( ({ icon, iconClassName, title, className, ...props }) => { @@ -32,13 +33,18 @@ export const IconBtn: React.FC = React.memo( ); + // 默认情况下的背景颜色 + const normalBg = props.active + ? 'bg-black bg-opacity-60' + : 'bg-black bg-opacity-20 hover:bg-opacity-60'; + const btnEl = (