Skip to content

Commit

Permalink
feat(front): apr modal, layermenu, issues !!! (#32)
Browse files Browse the repository at this point in the history
* fix tabs

* wip

* lint
  • Loading branch information
indaviande authored Dec 16, 2024
1 parent 312fdde commit 274a791
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/components/primitives/Button.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const buttonStyles = tv(
hype: "text-main-1 bg-accent-11 active:bg-accent-10",
},
size: {
xs: "px-sm py-xs gap-sm text-xs",
xs: "px-sm py-sm gap-sm text-xs",
sm: "px-sm py-md gap-sm text-sm",
md: "px-md py-md gap-sm text-base",
lg: "px-lg py-lg gap-sm text-lg",
Expand Down
11 changes: 9 additions & 2 deletions src/components/primitives/Tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -147,22 +147,29 @@ export default function Tabs({ look, size, to, theme, className, tabs = [], ...p
<Container>
<Group className={mergeClass(line(), "gap-xl*2 items-center w-full")}>
{tabs.map(tab => {
const relativeUrl = tab.link.split("?")[0];

return (
<>
{tab.link ? (
<EventBlocker key={tab.key}>
<Link
to={tab.link}
style={themeVars}
className={mergeClass(styleProps, base(), className, location.pathname === tab.link && active())}>
className={mergeClass(
styleProps,
base(),
className,
location.pathname === relativeUrl && active(),
)}>
{tab.label}
</Link>
</EventBlocker>
) : (
<button
key={tab.key}
style={themeVars}
className={mergeClass(styleProps, base(), className, location.pathname === tab.link && active())}
className={mergeClass(styleProps, base(), className, location.pathname === relativeUrl && active())}
type="button"
{...props}>
{tab.label}
Expand Down

0 comments on commit 274a791

Please sign in to comment.