website refactor
This commit is contained in:
@@ -13,6 +13,8 @@ interface IconButtonProps {
|
||||
title?: string;
|
||||
disabled?: boolean;
|
||||
color?: string;
|
||||
className?: string;
|
||||
backgroundColor?: string;
|
||||
}
|
||||
|
||||
export function IconButton({
|
||||
@@ -23,6 +25,8 @@ export function IconButton({
|
||||
title,
|
||||
disabled,
|
||||
color,
|
||||
className = '',
|
||||
backgroundColor,
|
||||
}: IconButtonProps) {
|
||||
const sizeMap = {
|
||||
sm: { btn: 'w-8 h-8 p-0', icon: 4 },
|
||||
@@ -36,7 +40,8 @@ export function IconButton({
|
||||
onClick={onClick}
|
||||
title={title}
|
||||
disabled={disabled}
|
||||
className={`${sizeMap[size].btn} rounded-full flex items-center justify-center min-h-0`}
|
||||
className={`${sizeMap[size].btn} rounded-full flex items-center justify-center min-h-0 ${className}`}
|
||||
backgroundColor={backgroundColor}
|
||||
>
|
||||
<Icon icon={icon} size={sizeMap[size].icon} color={color} />
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user