update
This commit is contained in:
parent
e2967f68b2
commit
ef2a6c41b4
39 changed files with 2349 additions and 30 deletions
|
|
@ -50,7 +50,11 @@ defmodule ZoeyscomputerWeb.CoreComponents do
|
|||
data-cancel={JS.exec(@on_cancel, "phx-remove")}
|
||||
class="relative z-50 hidden"
|
||||
>
|
||||
<div id={"#{@id}-bg"} class="bg-zinc-50/90 fixed inset-0 transition-opacity" aria-hidden="true" />
|
||||
<div
|
||||
id={"#{@id}-bg"}
|
||||
class="bg-ctp-base/90 fixed inset-0 transition-opacity"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
<div
|
||||
class="fixed inset-0 overflow-y-auto"
|
||||
aria-labelledby={"#{@id}-title"}
|
||||
|
|
@ -429,10 +433,10 @@ defmodule ZoeyscomputerWeb.CoreComponents do
|
|||
~H"""
|
||||
<header class={[@actions != [] && "flex items-center justify-between gap-6", @class]}>
|
||||
<div>
|
||||
<h1 class="text-lg font-semibold leading-8">
|
||||
<h1 class="text-lg font-semibold text-ctp-text leading-8">
|
||||
<%= render_slot(@inner_block) %>
|
||||
</h1>
|
||||
<p :if={@subtitle != []} class="mt-2 text-sm leading-6 text-ctp-overlay2">
|
||||
<p :if={@subtitle != []} class="mt-2 text-sm leading-6 text-ctp-subtext0">
|
||||
<%= render_slot(@subtitle) %>
|
||||
</p>
|
||||
</div>
|
||||
|
|
@ -441,6 +445,26 @@ defmodule ZoeyscomputerWeb.CoreComponents do
|
|||
"""
|
||||
end
|
||||
|
||||
attr :id, :string, required: true
|
||||
attr :content, :string, required: true
|
||||
|
||||
@doc """
|
||||
Copy to clipboard button.
|
||||
"""
|
||||
def copy_button(assigns) do
|
||||
~H"""
|
||||
<button
|
||||
id={@id}
|
||||
content={@content}
|
||||
phx-click={JS.dispatch("phx:copy", to: "##{@content}")}
|
||||
type="button"
|
||||
class="rounded-md inline-flex items-center bg-white px-2.5 py-1.5 text-sm font-semibold text-gray-900 shadow-sm ring-1 ring-inset ring-gray-300 hover:bg-gray-50"
|
||||
>
|
||||
Copy
|
||||
</button>
|
||||
"""
|
||||
end
|
||||
|
||||
@doc ~S"""
|
||||
Renders a table with generic styling.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue