Skip to content

Commit

Permalink
add story for drawer
Browse files Browse the repository at this point in the history
  • Loading branch information
woylie committed Dec 16, 2023
1 parent 74002cc commit d53051f
Showing 1 changed file with 68 additions and 0 deletions.
68 changes: 68 additions & 0 deletions priv/storybook/components/drawer.story.exs
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
defmodule Storybook.Components.Drawer do
use PhoenixStorybook.Story, :component

def function, do: &Doggo.drawer/1

def variations do
[
%Variation{
id: :default,
slots: [
"""
<:brand>
<Phoenix.Component.link navigate="/">
Pet Clinic
</Phoenix.Component.link>
</:brand>
""",
"""
<:top>
<Doggo.drawer_nav aria-label="Main navigation">
<:item>
<Phoenix.Component.link navigate="/dashboard">
Dashboard
</Phoenix.Component.link>
</:item>
<:item>
<Doggo.drawer_nested_nav>
<:title>Content</:title>
<:item current_page>
<Phoenix.Component.link navigate="/posts">
Posts
</Phoenix.Component.link>
</:item>
<:item>
<Phoenix.Component.link navigate="/comments">
Comments
</Phoenix.Component.link>
</:item>
</Doggo.drawer_nested_nav>
</:item>
</Doggo.drawer_nav>
<Doggo.drawer_section>
<:title>Search</:title>
<:item><input type="search" placeholder="Search" /></:item>
</Doggo.drawer_section>
</:top>
""",
"""
<:bottom>
<Doggo.drawer_nav aria-label="User menu">
<:item>
<Phoenix.Component.link navigate="/settings">
Settings
</Phoenix.Component.link>
</:item>
<:item>
<Phoenix.Component.link navigate="/logout">
Logout
</Phoenix.Component.link>
</:item>
</Doggo.drawer_nav>
</:bottom>
"""
]
}
]
end
end

0 comments on commit d53051f

Please sign in to comment.