From 8b0f900b7374775d0f709ce598e38fc44a5be848 Mon Sep 17 00:00:00 2001 From: Mathias Polligkeit Date: Sat, 25 Nov 2023 17:24:15 +0900 Subject: [PATCH] rename sidebar to drawer --- lib/doggo.ex | 88 ++++++++++++++++++++++++++-------------------------- 1 file changed, 44 insertions(+), 44 deletions(-) diff --git a/lib/doggo.ex b/lib/doggo.ex index 20156341..962c0095 100644 --- a/lib/doggo.ex +++ b/lib/doggo.ex @@ -870,24 +870,24 @@ defmodule Doggo do end @doc """ - Renders a sidebar with a `brand`, `top`, and `bottom` slot. + Renders a drawer with a `brand`, `top`, and `bottom` slot. - Within the slots, you can use the `sidebar_nav/1` and `sidebar_section/1` + Within the slots, you can use the `drawer_nav/1` and `drawer_section/1` components. ## Example - <.sidebar> + <.drawer> <:brand> <.link navigate={~p"/"}>App <:top> - <.sidebar_nav aria-label="Main navigation"> + <.drawer_nav aria-label="Main navigation"> <:item> <.link navigate={~p"/dashboard"}>Dashboard <:item> - <.sidebar_nested_nav> + <.drawer_nested_nav> <:title>Content <:item current_page> <.link navigate={~p"/posts"}>Posts @@ -895,25 +895,25 @@ defmodule Doggo do <:item> <.link navigate={~p"/comments"}>Comments - + - - <.sidebar_section> + + <.drawer_section> <:title>Search <:item> - + <:bottom> - <.sidebar_nav aria-label="User menu"> + <.drawer_nav aria-label="User menu"> <:item> <.link navigate={~p"/settings"}>Settings <:item> <.link navigate={~p"/logout"}>Logout - + - + """ attr :class, :any, @@ -932,20 +932,20 @@ defmodule Doggo do slot :bottom, doc: """ - Slot for content that is rendered at the end of the sidebar, pinned to the + Slot for content that is rendered at the end of the drawer, pinned to the bottom, if there is enough room. """ - def sidebar(assigns) do + def drawer(assigns) do ~H""" -