-
Notifications
You must be signed in to change notification settings - Fork 7
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
91 additions
and
5 deletions.
There are no files selected for viewing
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,20 @@ | ||
import type { Meta, StoryObj } from "@storybook/react"; | ||
|
||
import NavBar from "./index"; | ||
|
||
const meta: Meta<typeof NavBar> = { | ||
title: "Bars/NavBar", | ||
component: NavBar, | ||
tags: ["autodocs"], | ||
argTypes: {}, | ||
}; | ||
|
||
export default meta; | ||
|
||
type PlaygroudStory = StoryObj<typeof NavBar>; | ||
|
||
export const Playgroud: PlaygroudStory = { | ||
render: (args) => <NavBar {...args}></NavBar>, | ||
}; | ||
|
||
Playgroud.args = {}; |
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,13 @@ | ||
import { cleanup, render, screen } from "@testing-library/react"; | ||
import NavBar from "./NavBar"; | ||
import "@testing-library/jest-dom"; | ||
import React from "react"; | ||
|
||
describe("NavBar", () => { | ||
afterEach(cleanup); | ||
|
||
it("NavBar", () => { | ||
render(<NavBar />); | ||
expect(screen.getByText("遊戲微服務大平台")).toBeInTheDocument(); | ||
}); | ||
}); |
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,37 @@ | ||
import { PropsWithChildren } from "react"; | ||
import Icon from "@/components/shared/Icon"; | ||
|
||
interface TagProps extends React.ComponentPropsWithoutRef<"div"> {} | ||
|
||
const NavBar = ({}: PropsWithChildren<TagProps>) => { | ||
return ( | ||
<div | ||
className={ | ||
"flex items-center justify-between h-14 pl-2 pr-4 py-1 gradient-black" | ||
} | ||
> | ||
<div id={"logo"} className={"flex px-2.5 items-center"}> | ||
<div | ||
id={"leading-icon"} | ||
className={"flex flex-col w-12 h-12 p-2 items-center justify-center"} | ||
> | ||
<Icon name="logo" className="w-6 h-6" /> | ||
</div> | ||
<div className={"ml-1 text-primary-100"}>遊戲微服務大平台</div> | ||
</div> | ||
<div id={"btn-group"} className={"flex"}> | ||
<div className={"w-12 h-12 p-3"}> | ||
<Icon name="chat" className="w-6 h-6 [&_*]:stroke-gray-500" /> | ||
</div> | ||
<div className={"w-12 h-12 p-3 ml-3"}> | ||
<Icon name="notification" className="w-6 h-6 [&_*]:stroke-gray-500" /> | ||
</div> | ||
<div className={"w-12 h-12 p-3 ml-3"}> | ||
<Icon name="player" className="w-6 h-6 [&_*]:stroke-gray-500" /> | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default NavBar; |
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,5 @@ | ||
import NarBar from "./NavBar"; | ||
|
||
export * from "./NavBar"; | ||
|
||
export default NarBar; |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.