Restyle submit page tabs as segmented control
This commit is contained in:
parent
239bf707aa
commit
2b11b872d9
1 changed files with 9 additions and 5 deletions
|
|
@ -147,18 +147,22 @@ defmodule MicrowavepropWeb.SubmitLive do
|
|||
</p>
|
||||
</div>
|
||||
|
||||
<div role="tablist" class="tabs tabs-bordered mb-6">
|
||||
<div class="flex gap-1 bg-base-200 rounded-lg p-1 mb-6 w-fit">
|
||||
<button
|
||||
role="tab"
|
||||
class={["tab", @active_tab == :single && "tab-active"]}
|
||||
class={[
|
||||
"px-4 py-2 text-sm font-medium rounded-md transition-colors",
|
||||
if(@active_tab == :single, do: "bg-primary text-primary-content", else: "hover:bg-base-300")
|
||||
]}
|
||||
phx-click="switch_tab"
|
||||
phx-value-tab="single"
|
||||
>
|
||||
Single Contact
|
||||
</button>
|
||||
<button
|
||||
role="tab"
|
||||
class={["tab", @active_tab == :csv && "tab-active"]}
|
||||
class={[
|
||||
"px-4 py-2 text-sm font-medium rounded-md transition-colors",
|
||||
if(@active_tab == :csv, do: "bg-primary text-primary-content", else: "hover:bg-base-300")
|
||||
]}
|
||||
phx-click="switch_tab"
|
||||
phx-value-tab="csv"
|
||||
>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue