Skip to content

Commit

Permalink
Initial new search button & modal styles
Browse files Browse the repository at this point in the history
  • Loading branch information
maciejkorsan committed Mar 20, 2024
1 parent 5aa7815 commit 4f692b2
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions ruby_event_store-browser/elm/src/Layout.elm
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import Browser.Events
import Browser.Navigation
import BrowserTime
import Dict
import FeatherIcons
import Html exposing (..)
import Html.Attributes exposing (class, href, id, list, placeholder, selected, value)
import Html.Events exposing (onClick, onInput, onSubmit)
Expand Down Expand Up @@ -219,9 +220,15 @@ fakeSearchInput : Html Msg
fakeSearchInput =
button
[ onClick ToggleDialog
, class "bg-white"
, class "text-red-100 outline-none text-sm flex gap-2 items-center bg-red-800 hover:bg-red-900 py-2 px-3 rounded"
]
[
FeatherIcons.search
|> FeatherIcons.withClass "size-4"
|> FeatherIcons.toHtml [],
text "Quick search…",
span [ class "text-xs" ] [ text "⌘K" ]
]
[ text "Go to stream..." ]


realSearchInput : WrappedModel Model -> Html Msg
Expand All @@ -236,5 +243,5 @@ searchModalId =
searchModal : WrappedModel Model -> Html Msg
searchModal model =
node "dialog"
[ id searchModalId ]
[ id searchModalId, class "backdrop:bg-white/30 backdrop:backdrop-blur-sm" ]
[ realSearchInput model ]

0 comments on commit 4f692b2

Please sign in to comment.