Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rename accordion_set to accordion #13

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 3 additions & 17 deletions sources/lib/components/station_ui/html/accordion.ex
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,14 @@ defmodule StationUI.HTML.Accordion do

## Example

<.accordion_set>
<.accordion>
<:header>
Title something 1
</:header>
<:content>
Content something 1
</:content>
</.accordion_set>
</.accordion>

Suggested size classes

Expand All @@ -37,20 +37,6 @@ defmodule StationUI.HTML.Accordion do
lg: "md:text-lg lg:text-xl"
xl: "md:text-lg lg:text-xl xl:text-2xl"
"""

def accordion(assigns) do
~H"""
<.accordion_set>
<:header>
Title something 1
</:header>
<:content>
Content something 1
</:content>
</.accordion_set>
"""
end

slot :header, required: true do
attr :button_id, :string
end
Expand All @@ -60,7 +46,7 @@ defmodule StationUI.HTML.Accordion do
attr :content_size_class, :string, default: "text-base md:text-lg"
attr :rest, :global

def accordion_set(assigns) do
def accordion(assigns) do
assigns =
assigns
|> assign(:header, List.wrap(assigns.header))
Expand Down
Loading