Skip to content

Commit

Permalink
fix: Menu and footer interactions
Browse files Browse the repository at this point in the history
  • Loading branch information
RabbitDoge committed Nov 11, 2020
1 parent 7f6422b commit f3f7f74
Showing 3 changed files with 12 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/components/Button/StyledButton.tsx
Original file line number Diff line number Diff line change
@@ -25,7 +25,8 @@ const StyledButton = styled.button<ButtonProps>`
font-family: inherit;
font-size: 16px;
font-weight: 600;
width: ${({ fullWidth }) => (fullWidth ? "100%" : "auto")};
/* max-content instead of auto for Safari fix */
width: ${({ fullWidth }) => (fullWidth ? "100%" : "max-content")};
height: ${({ size }) => (size === "sm" ? "32px" : "48px")};
letter-spacing: 0.03em;
justify-content: center;
2 changes: 1 addition & 1 deletion src/widgets/Footer/config.ts
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ export default [
},
{
label: "Blog",
href: "https://pancakeswap.finance/stakin",
href: "https://pancakeswap.medium.com",
},
{
label: "Telegram",
11 changes: 9 additions & 2 deletions src/widgets/Nav/Panel.tsx
Original file line number Diff line number Diff line change
@@ -114,7 +114,7 @@ const Panel: React.FC<Props> = ({
{entry.label}
</a>
) : (
<NavLink key={entry.href} to={entry.href}>
<NavLink key={entry.href} to={entry.href} onClick={closeNav}>
{entry.label}
</NavLink>
)
@@ -132,7 +132,14 @@ const Panel: React.FC<Props> = ({
}
>
{langs.map((lang) => (
<Button key={lang.code} variant="text" size="sm" onClick={() => setLang(lang)}>
<Button
key={lang.code}
variant="text"
size="sm"
onClick={() => setLang(lang)}
// Safari specific fix
style={{ minHeight: "32px" }}
>
{lang.language}
</Button>
))}

0 comments on commit f3f7f74

Please sign in to comment.