🐛 fix(atoms): prevent IconLinks click propagation
This commit is contained in:
@@ -16,7 +16,12 @@ interface IconWrapperProps extends IconLinkProps {
|
|||||||
const IconWrapper = ({ index, href: to, fontSize, Icon, ...props }: IconWrapperProps) => {
|
const IconWrapper = ({ index, href: to, fontSize, Icon, ...props }: IconWrapperProps) => {
|
||||||
if (typeof index === 'undefined') {
|
if (typeof index === 'undefined') {
|
||||||
return (
|
return (
|
||||||
<IconButton onClick={() => window.open(to, '_blank')} {...props}>
|
<IconButton
|
||||||
|
onClick={e => {
|
||||||
|
e.stopPropagation()
|
||||||
|
window.open(to, '_blank')
|
||||||
|
}}
|
||||||
|
{...props}>
|
||||||
<Icon fontSize={fontSize} />
|
<Icon fontSize={fontSize} />
|
||||||
</IconButton>
|
</IconButton>
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user