/
left_menu.story.exs
45 lines (43 loc) · 1.36 KB
/
left_menu.story.exs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
defmodule PhxWCStorybookWeb.Storybook.Components.LeftMenu do
# :live_component or :page are also available
use PhxLiveStorybook.Story, :component
import Phoenix.WebComponent.LeftMenu
def function, do: &Phoenix.WebComponent.LeftMenu.wc_left_menu/1
def description, do: "A left menu element."
def variations do
[
%Variation{
id: :default,
attributes: %{
active: "left_menu",
},
slots: [
"<:title>Menu Demo</:title>",
"""
<:menu>
Phx Hook
</:menu>
""",
"""
<:menu>
Icons
</:menu>
""",
"""
<:menu>
<.wc_left_menu_group active={"left_menu"}>
<:title>Components</:title>
<:menu id="table" to="/storybook/components/actionbar">Actionbar</:menu>
<:menu id="card" to="/storybook/components/card">Card</:menu>
<:menu id="left_menu" to="/storybook/components/left_menu">Left Menu</:menu>
<:menu id="markdown" to="/storybook/components/markdown">Markdown</:menu>
<:menu id="pagination" to="/storybook/components/pagination">Pagination</:menu>
<:menu id="table" to="/storybook/components/table">Table</:menu>
</.wc_left_menu_group>
</:menu>
""",
]
}
]
end
end