@ -34,10 +34,10 @@ defmodule PlausibleWeb.Components.TwoFactor do
attr :form_target , :string , required : true
attr :onsubmit , :string , default : " "
attr :title , :string , required : true
attr :submit_label , :string , default : " Submit "
slot :icon , required : true
slot :inner_block , required : true
slot :buttons , required : true
def modal ( assigns ) do
~H """
@ -96,11 +96,8 @@ defmodule PlausibleWeb.Components.TwoFactor do
< div class = " mx-auto flex-shrink-0 flex items-center justify-center h-12 w-12 rounded-full bg-green-100 sm:mx-0 sm:h-10 sm:w-10 " >
< % = render_slot ( @icon ) % >
< / div >
< div class = " mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left " >
< h3
class = " text-lg leading-6 font-medium text-gray-900 dark:text-gray-100 "
id = " modal-title "
>
< div class = " mt-3 text-center sm:mt-0 sm:ml-4 sm:text-left text-gray-900 dark:text-gray-100 " >
< h3 class = " text-lg leading-6 font-medium " id = " modal-title " >
< % = @title % >
< / h3 >
@ -109,15 +106,10 @@ defmodule PlausibleWeb.Components.TwoFactor do
< / div >
< / div >
< div class = " bg-gray-50 dark:bg-gray-850 px-4 py-3 sm:px-6 sm:flex sm:flex-row-reverse " >
< button
type = " submit "
class = " w-full inline-flex justify-center rounded-md border border-transparent shadow-sm px-4 py-2 bg-indigo-600 text-base font-medium text-white hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-700 sm:ml-3 sm:w-auto sm:text-sm "
>
< % = @submit_label % >
< / button >
< % = render_slot ( @buttons ) % >
< button
type = " button "
class = " m t-3 w-full inline-flex justify-center rounded-md border border-gray-300 dark:border-gray-500 shadow-sm px-4 py-2 bg-white dark:bg-gray-800 text-base font-medium text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-850 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm"
class = " mx-2 mt-3 w-full inline-flex justify-center rounded-md border border-gray-300 dark:border-gray-500 shadow-sm px-4 py-2 bg-white dark:bg-gray-800 text-base font-medium text-gray-700 dark:text-gray-300 hover:bg-gray-50 dark:hover:bg-gray-850 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500 sm:mt-0 sm:ml-3 sm:w-auto sm:text-sm "
x - on :click = { " #{ @state_param } = false " }
>
Cancel