2022-04-02 08:11:17 +13:00
|
|
|
defmodule AshHqWeb.Components.SearchBar do
|
2022-08-07 11:22:58 +12:00
|
|
|
@moduledoc "A clickable search bar that brings up the search overlay"
|
2022-04-02 08:11:17 +13:00
|
|
|
use Surface.Component
|
|
|
|
|
|
|
|
prop class, :css_class, default: ""
|
|
|
|
|
|
|
|
def render(assigns) do
|
|
|
|
~F"""
|
|
|
|
<button
|
2022-04-02 11:49:26 +13:00
|
|
|
class={
|
2022-09-08 15:51:47 +12:00
|
|
|
"w-96 button border border-base-light-400 bg-base-light-200 dark:border-base-dark-700 rounded-lg dark:bg-base-dark-700 hover:bg-base-light-300 dark:hover:bg-base-dark-600",
|
2022-04-02 11:49:26 +13:00
|
|
|
@class
|
|
|
|
}
|
2022-04-02 08:11:17 +13:00
|
|
|
phx-click={AshHqWeb.AppViewLive.toggle_search()}
|
|
|
|
>
|
|
|
|
<div class="flex flex-row justify-between items-center px-4">
|
|
|
|
<div class="h-12 flex flex-row justify-start items-center text-center space-x-4">
|
|
|
|
<Heroicons.Outline.SearchIcon class="w-4 h-4" />
|
|
|
|
<div>Search Documentation</div>
|
|
|
|
</div>
|
|
|
|
<div>⌘ K</div>
|
|
|
|
</div>
|
|
|
|
</button>
|
|
|
|
"""
|
|
|
|
end
|
|
|
|
end
|