„lib/chiya_web/components/public_components.ex“ ändern
This commit is contained in:
parent
e7c2a05472
commit
4351e40fad
1 changed files with 4 additions and 2 deletions
|
@ -69,6 +69,8 @@ defmodule ChiyaWeb.PublicComponents do
|
|||
Renders a note-header with title.
|
||||
"""
|
||||
attr :class, :string, default: nil
|
||||
attr :titleclass, :string, default: nil
|
||||
attr :subtitleclass, :string, default: nil
|
||||
|
||||
slot :title, required: true
|
||||
slot :subtitle
|
||||
|
@ -76,10 +78,10 @@ defmodule ChiyaWeb.PublicComponents do
|
|||
def header(assigns) do
|
||||
~H"""
|
||||
<header class={["p-8 rounded", @class]}>
|
||||
<h1 class="text-3xl font-extrabold leading-10 tracking-tight text-theme-primary">
|
||||
<h1 class={["text-3xl font-extrabold leading-10 tracking-tight text-theme-primary", @titleclass]}>
|
||||
<%= render_slot(@title) %>
|
||||
</h1>
|
||||
<p :if={@subtitle != []} class="mt-4 leading-7 text-theme-base/75 uppercase font-semibold">
|
||||
<p :if={@subtitle != []} class={["mt-4 leading-7 text-theme-base/75 uppercase font-semibold", @subtitleclass]}>
|
||||
<%= render_slot(@subtitle) %>
|
||||
</p>
|
||||
</header>
|
||||
|
|
Loading…
Reference in a new issue