mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 20:40:15 +02:00
fix: correct propagation on settings menu (#1453)
* fix propagation error on settings menu
This commit is contained in:
@@ -16,6 +16,7 @@ export interface ActionIconProps
|
||||
MantineActionIconProps {
|
||||
icon?: keyof typeof AppIcon;
|
||||
iconProps?: Omit<IconProps, 'icon'>;
|
||||
stopsPropagation?: boolean;
|
||||
tooltip?: Omit<TooltipProps, 'children'>;
|
||||
}
|
||||
|
||||
@@ -26,13 +27,20 @@ const _ActionIcon = forwardRef<HTMLButtonElement, ActionIconProps>(
|
||||
classNames,
|
||||
icon,
|
||||
iconProps,
|
||||
onClick,
|
||||
size = 'sm',
|
||||
stopsPropagation,
|
||||
tooltip,
|
||||
variant = 'default',
|
||||
...props
|
||||
},
|
||||
ref,
|
||||
) => {
|
||||
const handleClick = (e: any) => {
|
||||
if (stopsPropagation) e.stopPropagation();
|
||||
if (onClick) onClick(e);
|
||||
};
|
||||
|
||||
const actionIconProps: ActionIconProps = {
|
||||
classNames: {
|
||||
root: styles.root,
|
||||
@@ -41,6 +49,7 @@ const _ActionIcon = forwardRef<HTMLButtonElement, ActionIconProps>(
|
||||
size,
|
||||
variant,
|
||||
...props,
|
||||
onClick: handleClick,
|
||||
};
|
||||
|
||||
if (tooltip && icon) {
|
||||
|
||||
Reference in New Issue
Block a user