Skip to content

Commit

Permalink
fix: navbar color fix
Browse files Browse the repository at this point in the history
  • Loading branch information
0xKurt committed Dec 6, 2024
1 parent 3e8b0de commit 076fe67
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/primitives/Navbar/Navbar.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ export const WithCustomSizeAndColor: Story = {
img: CheckerIcon,
link: "#",
size: "w-8",
color: "moss-500",
color: "#d30000",
},
text: {
text: "Custom Size and Color Navbar",
Expand Down
10 changes: 6 additions & 4 deletions src/primitives/Navbar/Navbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const navbarVariants = tv({
base: "top-0 flex h-[64px] w-full shrink-0 flex-col items-center justify-center gap-2 p-[10px_80px]",
container: "flex w-full items-center justify-between",
leftSection: "flex items-center gap-4",
divider: "h-4 border-r border-grey-700",
divider: "h-4 border-r-1.5 border-grey-700",
text: "font-mono text-lg",
rightSection: "flex items-center",
},
Expand Down Expand Up @@ -60,7 +60,7 @@ export const Navbar = ({

const LogoComponent = img;
return (
<a href={link || "#"}>
<a href={link || "#"} style={{ color: color }}>
<LogoComponent className={logoClasses} />
</a>
);
Expand All @@ -81,8 +81,10 @@ export const Navbar = ({
<div className={leftSection()}>
{renderLogo(primaryLogo || {})}
{showDivider && <div className={divider()}></div>}
{secondaryLogo && renderLogo(secondaryLogo)}
{renderText(text)}
<div className="flex items-center gap-2">
{secondaryLogo && renderLogo(secondaryLogo)}
{renderText(text)}
</div>
</div>
<div className={rightSection()}>{children}</div>
</div>
Expand Down
8 changes: 7 additions & 1 deletion tailwind.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,19 @@ import { withTV } from "tailwind-variants/transformer";
import type { Config } from "tailwindcss";
import tailwindcssAnimate from "tailwindcss-animate";



import { colors } from "./src/tokens/colors";


export default withTV({
content: ["./src/**/*.{js,ts,jsx,tsx,mdx}"],
darkMode: ["class", "[data-mode='dark']"],
theme: {
extend: {
borderWidth: {
"1.5": "1.5px",
},
height: {
"18": "4.5rem",
},
Expand Down Expand Up @@ -68,4 +74,4 @@ export default withTV({
},
},
plugins: [tailwindcssAnimate],
}) satisfies Config;
}) satisfies Config;

0 comments on commit 076fe67

Please sign in to comment.