-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
178 additions
and
23 deletions.
There are no files selected for viewing
72 changes: 72 additions & 0 deletions
72
packages/components/src/Navbar/ForDesktop/index.module.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
.container { | ||
@apply block w-full text-white pt-2 h-12 z-50 mx-auto pb-2; | ||
} | ||
|
||
.inner { | ||
@apply flex justify-between items-center h-full px-6 w-full; | ||
|
||
a, | ||
button { | ||
@apply text-sm font-normal text-white/90 hover:text-blue-200 tracking-wide; | ||
} | ||
} | ||
|
||
.dark { | ||
@apply text-background-acc-1; | ||
|
||
a, | ||
button { | ||
@apply text-background-acc-1 font-semibold; | ||
|
||
&:hover { | ||
@apply text-primary text-opacity-80; | ||
} | ||
} | ||
} | ||
|
||
.large { | ||
@apply h-16 px-8; | ||
|
||
a, | ||
button { | ||
@apply text-base; | ||
} | ||
} | ||
|
||
.left { | ||
@apply flex w-1/3 ml-6 order-first; | ||
|
||
a { | ||
@apply ml-2 mr-10; | ||
} | ||
} | ||
|
||
.logo { | ||
img { | ||
@apply max-h-6 max-w-60; | ||
} | ||
} | ||
|
||
.right { | ||
@apply flex justify-end mr-6 w-1/3; | ||
|
||
a { | ||
@apply mr-2 ml-10; | ||
} | ||
} | ||
|
||
.logoLeft { | ||
@apply justify-start relative; | ||
|
||
.left { | ||
@apply order-2 w-auto; | ||
} | ||
|
||
.logo { | ||
@apply order-first ml-3 mr-3; | ||
} | ||
|
||
.right { | ||
@apply order-3 w-auto absolute right-0 mr-4; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import cx from "classnames"; | ||
import React, { ReactNode } from "react"; | ||
import css from "./index.module.css"; | ||
|
||
type Props = { | ||
leftLinks: ReactNode; | ||
logo: ReactNode; | ||
rightLinks: ReactNode; | ||
className?: string; | ||
bgColor?: string; | ||
large?: boolean; | ||
dark?: boolean; | ||
logoLeft?: boolean; | ||
}; | ||
|
||
export default function DesktopNavbar(props: Props) { | ||
return ( | ||
<div | ||
className={cx( | ||
css.container, | ||
props.bgColor ?? "bg-background-acc-1", | ||
{ [css.large]: props.large, [css.dark]: props.dark }, | ||
props.className, | ||
)} | ||
> | ||
<div | ||
className={cx(css.inner, { | ||
[css.dark]: props.dark, | ||
[css.logoLeft]: props.logoLeft, | ||
})} | ||
> | ||
<div className={css.left}>{props.leftLinks}</div> | ||
<div className={css.logo}>{props.logo}</div> | ||
<div className={css.right}>{props.rightLinks}</div> | ||
</div> | ||
</div> | ||
); | ||
} |
4 changes: 0 additions & 4 deletions
4
...es/components/src/Navbar/index.module.css → ...nts/src/Navbar/ForMobile/index.module.css
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,5 @@ | ||
.container { | ||
@apply w-full text-white px-5 py-2 h-14; | ||
|
||
@screen lg { | ||
@apply hidden; | ||
} | ||
} | ||
|
||
.top { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import type { Meta, StoryObj } from "@storybook/react"; | ||
import React from "react"; | ||
import DesktopNavbar from "../Navbar/ForDesktop"; | ||
|
||
const meta: Meta<typeof DesktopNavbar> = { | ||
title: "DesktopNavbar", | ||
component: DesktopNavbar, | ||
tags: ["autodocs"], | ||
}; | ||
|
||
export default meta; | ||
|
||
type Story = StoryObj<typeof DesktopNavbar>; | ||
|
||
export const Basic: Story = { | ||
args: { | ||
logo: ( | ||
<img | ||
src="https://dolthub.awsdev.ld-corp.com/blog/static/bd834a2859f2246200c1692940ff1409/222b7/dolt-logo-1.png" | ||
alt="LOGO" | ||
/> | ||
), | ||
leftLinks: ( | ||
<> | ||
<a>Pricing</a> | ||
<a>Blog</a> | ||
<a>Documentation</a> | ||
</> | ||
), | ||
rightLinks: ( | ||
<> | ||
<a>Profile</a> | ||
<a>Another</a> | ||
</> | ||
), | ||
}, | ||
}; | ||
|
||
export const Large: Story = { | ||
args: { | ||
...Basic.args, | ||
large: true, | ||
}, | ||
}; | ||
|
||
export const Dark: Story = { | ||
args: { | ||
...Basic.args, | ||
dark: true, | ||
bgColor: "bg-transparent", | ||
}, | ||
parameters: { | ||
backgrounds: { default: "lightish" }, | ||
}, | ||
}; | ||
|
||
export const LogoLeft: Story = { | ||
args: { | ||
...Basic.args, | ||
logoLeft: true, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters