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>
|
</p>
|
||||||
</div>
|
</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
|
<button
|
||||||
role="tab"
|
class={[
|
||||||
class={["tab", @active_tab == :single && "tab-active"]}
|
"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-click="switch_tab"
|
||||||
phx-value-tab="single"
|
phx-value-tab="single"
|
||||||
>
|
>
|
||||||
Single Contact
|
Single Contact
|
||||||
</button>
|
</button>
|
||||||
<button
|
<button
|
||||||
role="tab"
|
class={[
|
||||||
class={["tab", @active_tab == :csv && "tab-active"]}
|
"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-click="switch_tab"
|
||||||
phx-value-tab="csv"
|
phx-value-tab="csv"
|
||||||
>
|
>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue