Skip to content
This repository has been archived by the owner on Apr 25, 2023. It is now read-only.

Commit

Permalink
fix button widget link bug
Browse files Browse the repository at this point in the history
  • Loading branch information
KaWaite committed Oct 26, 2021
1 parent e716008 commit 22e0acd
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions src/components/molecules/Visualizer/Widget/Button/MenuButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,16 @@ export default function ({
? "top-start"
: "top-end"
: position?.area === "middle"
? position?.section === "left"
? align === "end"
? "top-start"
: "bottom-start"
: align === "end"
? "top-end"
: "bottom-end"
: position?.section === "right" || align === "end"
? "bottom-end"
: "bottom-start",
? position?.section === "left"
? align === "end"
? "top-start"
: "bottom-start"
: align === "end"
? "top-end"
: "bottom-end"
: position?.section === "right" || align === "end"
? "bottom-end"
: "bottom-start",
modifiers: [
{
name: "eventListeners",
Expand Down Expand Up @@ -109,8 +109,8 @@ export default function ({
const splitLink = link?.split("/");
if (splitLink?.[0] !== "http:" && splitLink?.[0] !== "https:") {
link = "https://" + link;
window.open(link, "_blank", "noopener");
}
window.open(link, "_blank", "noopener");
}
}
setVisibleMenuButton(false);
Expand Down Expand Up @@ -193,7 +193,7 @@ const Button = styled.div<{ button?: Button; publishedTheme: PublishTheme }>`
&:hover {
background: ${({ publishedTheme, button }) =>
mask(button?.buttonBgcolor) || publishedTheme.mask};
mask(button?.buttonBgcolor) || publishedTheme.mask};
}
`;

Expand All @@ -213,7 +213,7 @@ const MenuInnerWrapper = styled.div<{ button?: Button; publishedTheme: PublishTh
hyphens: auto;
`;

const MenuItem = styled(Flex)<{ item?: MenuItem; button?: Button; publishedTheme: PublishTheme }>`
const MenuItem = styled(Flex) <{ item?: MenuItem; button?: Button; publishedTheme: PublishTheme }>`
min-height: ${({ item }) => (item?.menuType === "border" ? null : "25px")};
border-radius: ${({ item }) => (item?.menuType === "border" ? null : "3px")};
padding: ${({ item }) => (item?.menuType === "border" ? "0 10px" : "2px 10px")};
Expand All @@ -228,6 +228,6 @@ const MenuItem = styled(Flex)<{ item?: MenuItem; button?: Button; publishedTheme
&:hover {
background: ${({ publishedTheme, item, button }) =>
item?.menuType === "border" ? null : mask(button?.buttonBgcolor) || publishedTheme.mask};
item?.menuType === "border" ? null : mask(button?.buttonBgcolor) || publishedTheme.mask};
}
`;

0 comments on commit 22e0acd

Please sign in to comment.