Skip to content

Commit

Permalink
chore: Fix format.
Browse files Browse the repository at this point in the history
  • Loading branch information
GSMLG-BOT committed Dec 3, 2022
1 parent f9b6a3c commit 7ac1596
Show file tree
Hide file tree
Showing 8 changed files with 41 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,24 +28,28 @@ defmodule Phoenix.WebComponent.Actionbar do
html attribute id
"""
)

attr(:class, :string,
default: "",
doc: """
html attribute class
"""
)

slot(:left,
required: false,
doc: """
Left part of action bar.
"""
)

slot(:right,
required: false,
doc: """
Right part of action bar.
"""
)

def wc_actionbar(assigns) do
assigns =
assigns
Expand Down
12 changes: 12 additions & 0 deletions apps/phoenix_webcomponent/lib/phoenix_webcomponent/appbar.ex
Original file line number Diff line number Diff line change
Expand Up @@ -34,18 +34,21 @@ defmodule Phoenix.WebComponent.Appbar do
html attribute id
"""
)

attr(:class, :string,
default: "",
doc: """
html attribute class
"""
)

attr(:title, :string,
default: "",
doc: """
Appbar title.
"""
)

attr(:menus, :list,
default: [],
doc: """
Expand All @@ -54,18 +57,21 @@ defmodule Phoenix.WebComponent.Appbar do
example: [ %{ label: "Menu Name", to: ~p"/menu-url" } ]
"""
)

slot(:logo,
required: false,
doc: """
Appbar Logo.
"""
)

slot(:user_profile,
required: false,
doc: """
Appbar right side user_profile.
"""
)

def wc_appbar(assigns) do
assigns =
assigns
Expand Down Expand Up @@ -123,18 +129,21 @@ defmodule Phoenix.WebComponent.Appbar do
html attribute id
"""
)

attr(:class, :string,
default: "",
doc: """
html attribute class
"""
)

attr(:title, :string,
default: "",
doc: """
Appbar title.
"""
)

attr(:menus, :list,
default: [],
doc: """
Expand All @@ -143,18 +152,21 @@ defmodule Phoenix.WebComponent.Appbar do
example: [ %{ label: "Menu Name", to: ~p"/menu-url" } ]
"""
)

slot(:logo,
required: false,
doc: """
Appbar Logo.
"""
)

slot(:user_profile,
required: false,
doc: """
Appbar right side user_profile.
"""
)

def wc_simple_appbar(assigns) do
assigns =
assigns
Expand Down
3 changes: 3 additions & 0 deletions apps/phoenix_webcomponent/lib/phoenix_webcomponent/card.ex
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,21 @@ defmodule Phoenix.WebComponent.Card do
html attribute id
"""
)

attr(:class, :string,
default: "",
doc: """
html attribute class
"""
)

slot(:title,
required: false,
doc: """
Render a card title.
"""
)

def wc_card(assigns) do
assigns =
assigns
Expand Down
3 changes: 3 additions & 0 deletions apps/phoenix_webcomponent/lib/phoenix_webcomponent/icons.ex
Original file line number Diff line number Diff line change
Expand Up @@ -53,18 +53,21 @@ defmodule Phoenix.WebComponent.Icons do
html attribute id
"""
)

attr(:class, :string,
default: "",
doc: """
html attribute class
"""
)

attr(:name, :string,
required: true,
doc: """
material icon name, avaliable names are return value of `mdi_icons()`.
"""
)

def wc_mdi(assigns) do
assigns =
assigns
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,21 @@ defmodule Phoenix.WebComponent.LeftMenu do
html attribute id
"""
)

attr(:class, :string,
default: "",
doc: """
html attribute class
"""
)

attr(:active, :string,
default: "",
doc: """
actvie menu id
"""
)

attr(:menus, :list,
default: [],
doc: """
Expand All @@ -52,12 +55,14 @@ defmodule Phoenix.WebComponent.LeftMenu do
]
"""
)

slot(:title,
required: false,
doc: """
Render a card title.
"""
)

def wc_left_menu(assigns) do
assigns =
assigns
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,24 +43,28 @@ defmodule Phoenix.WebComponent.Markdown do
html attribute id
"""
)

attr(:class, :string,
default: "",
doc: """
html attribute class
"""
)

attr(:debug, :boolean,
default: false,
doc: """
remark-element attribute, enable debug
"""
)

attr(:content, :string,
default: "",
doc: """
markdown content
"""
)

def wc_markdown(assigns) do
assigns =
assigns
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,36 +40,42 @@ defmodule Phoenix.WebComponent.Pagination do
html attribute id
"""
)

attr(:class, :string,
default: "",
doc: """
html attribute class
"""
)

attr(:page_size, :integer,
default: 10,
doc: """
items shows per page
"""
)

attr(:page_num, :integer,
default: 1,
doc: """
page num
"""
)

attr(:total, :integer,
default: 0,
doc: """
total items count
"""
)

attr(:update_event, :string,
default: "",
doc: """
Phoenix live event name for page status update.
"""
)

def wc_pagination(assigns) do
assigns =
assigns
Expand Down
4 changes: 4 additions & 0 deletions apps/phoenix_webcomponent/lib/phoenix_webcomponent/table.ex
Original file line number Diff line number Diff line change
Expand Up @@ -54,18 +54,21 @@ defmodule Phoenix.WebComponent.Table do
html attribute id
"""
)

attr(:class, :string,
default: "",
doc: """
html attribute class
"""
)

attr(:rows, :list,
default: [],
doc: """
table data list
"""
)

slot(:col,
required: false,
doc: """
Expand All @@ -79,6 +82,7 @@ defmodule Phoenix.WebComponent.Table do
```
"""
)

def wc_table(assigns) do
assigns =
assigns
Expand Down

0 comments on commit 7ac1596

Please sign in to comment.