Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: navbar color fix #78

Merged
merged 1 commit into from
Dec 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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;
Loading