mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-09-21 20:27:36 +03:00
💀 remove no-longer-needed static view
This commit is contained in:
parent
0ed086073a
commit
6d1b44509e
@ -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
|
||||
|
@ -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 = []
|
||||
|
Loading…
Reference in New Issue
Block a user