-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #10 from team-nabi/NABI-67
🎉 Dropdown 추가
- Loading branch information
Showing
6 changed files
with
429 additions
and
10 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
import type { Meta, StoryObj } from '@storybook/react' | ||
import Button from '../Button' | ||
import { | ||
DropdownMenu, | ||
DropdownMenuContent, | ||
DropdownMenuGroup, | ||
DropdownMenuItem, | ||
DropdownMenuLabel, | ||
DropdownMenuPortal, | ||
DropdownMenuSeparator, | ||
DropdownMenuShortcut, | ||
DropdownMenuSub, | ||
DropdownMenuSubContent, | ||
DropdownMenuSubTrigger, | ||
DropdownMenuTrigger, | ||
} from './DropdownMenu' | ||
|
||
const meta = { | ||
title: 'UI/DropdownMenu', | ||
component: DropdownMenu, | ||
tags: ['autodocs'], | ||
argTypes: {}, | ||
} satisfies Meta<typeof DropdownMenu> | ||
|
||
export default meta | ||
type Story = StoryObj<typeof meta> | ||
|
||
export const Normal: Story = { | ||
args: {}, | ||
render: () => { | ||
return ( | ||
<DropdownMenu> | ||
<DropdownMenuTrigger asChild> | ||
<Button variant="primary">Open</Button> | ||
</DropdownMenuTrigger> | ||
<DropdownMenuContent className="w-56"> | ||
<DropdownMenuLabel>My Account</DropdownMenuLabel> | ||
<DropdownMenuSeparator /> | ||
<DropdownMenuGroup> | ||
<DropdownMenuItem> | ||
Profile | ||
<DropdownMenuShortcut>⇧⌘P</DropdownMenuShortcut> | ||
</DropdownMenuItem> | ||
<DropdownMenuItem> | ||
Billing | ||
<DropdownMenuShortcut>⌘B</DropdownMenuShortcut> | ||
</DropdownMenuItem> | ||
<DropdownMenuItem> | ||
Settings | ||
<DropdownMenuShortcut>⌘S</DropdownMenuShortcut> | ||
</DropdownMenuItem> | ||
<DropdownMenuItem> | ||
Keyboard shortcuts | ||
<DropdownMenuShortcut>⌘K</DropdownMenuShortcut> | ||
</DropdownMenuItem> | ||
</DropdownMenuGroup> | ||
<DropdownMenuSeparator /> | ||
<DropdownMenuGroup> | ||
<DropdownMenuItem>Team</DropdownMenuItem> | ||
<DropdownMenuSub> | ||
<DropdownMenuSubTrigger>Invite users</DropdownMenuSubTrigger> | ||
<DropdownMenuPortal> | ||
<DropdownMenuSubContent> | ||
<DropdownMenuItem>Email</DropdownMenuItem> | ||
<DropdownMenuItem>Message</DropdownMenuItem> | ||
<DropdownMenuSeparator /> | ||
<DropdownMenuItem>More...</DropdownMenuItem> | ||
</DropdownMenuSubContent> | ||
</DropdownMenuPortal> | ||
</DropdownMenuSub> | ||
<DropdownMenuItem> | ||
New Team | ||
<DropdownMenuShortcut>⌘+T</DropdownMenuShortcut> | ||
</DropdownMenuItem> | ||
</DropdownMenuGroup> | ||
<DropdownMenuSeparator /> | ||
<DropdownMenuItem>GitHub</DropdownMenuItem> | ||
<DropdownMenuItem>Support</DropdownMenuItem> | ||
<DropdownMenuItem disabled>API</DropdownMenuItem> | ||
<DropdownMenuSeparator /> | ||
<DropdownMenuItem> | ||
Log out | ||
<DropdownMenuShortcut>⇧⌘Q</DropdownMenuShortcut> | ||
</DropdownMenuItem> | ||
</DropdownMenuContent> | ||
</DropdownMenu> | ||
) | ||
}, | ||
} |
Oops, something went wrong.