💀 remove no-longer-needed static view

This commit is contained in:
Tessa Kelly 2022-10-27 15:52:28 -06:00
parent 0ed086073a
commit 6d1b44509e
2 changed files with 3 additions and 27 deletions

View File

@ -1,8 +1,8 @@
module Nri.Ui.HighlighterToolbar.V1 exposing (view, static)
module Nri.Ui.HighlighterToolbar.V1 exposing (view)
{-| Bar with markers for choosing how text will be highlighted in a highlighter.
@docs view, static
@docs view
-}
@ -17,7 +17,6 @@ import Nri.Ui.Html.Attributes.V2 exposing (nriDescription)
import Nri.Ui.Html.V3 exposing (viewIf)
import Nri.Ui.Svg.V1 as Svg
import Nri.Ui.UiIcon.V1 as UiIcon
import Nri.Ui.Util exposing (dashify)
toolbar : List (Html msg) -> Html msg
@ -66,27 +65,6 @@ view config model =
)
{-| Render only tags and not eraser without triggering an action
-}
static :
(a -> String)
-> (a -> { extras | colorSolid : Color, colorLight : Color })
-> List a
-> Html msg
static getName getColor tags =
toolbar (List.map (staticTag getName getColor) tags)
staticTag :
(a -> String)
-> (a -> { extras | colorSolid : Color, colorLight : Color })
-> a
-> Html msg
staticTag getName getColor tag =
toolContainer ("static-tag-" ++ dashify (getName tag))
(toolContent (getName tag) (getColor tag) (Just tag))
viewTag :
{ onSetEraser : msg
, onChangeTag : tag -> msg

View File

@ -50,7 +50,7 @@ example =
, renderExample = Code.unstyledView
, toExampleCode = \_ -> []
}
, Heading.h2 [ Heading.plaintext "Interactive Example" ]
, Heading.h2 [ Heading.plaintext "Example" ]
, HighlighterToolbar.view
{ onSetEraser = SetTool Nothing
, onChangeTag = SetTool << Just
@ -60,8 +60,6 @@ example =
{ currentTool = state.currentTool
, tags = tags
}
, Heading.h2 [ Heading.plaintext "Non-interactive examples" ]
, HighlighterToolbar.static getName getColor tags
]
, categories = [ Buttons, Interactions ]
, keyboardSupport = []