mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2024-11-24 08:53:33 +03:00
Use V2 of the segmented control in the style guide
This commit is contained in:
parent
a00262c3aa
commit
349e9760a3
@ -8,7 +8,7 @@ module Examples.SegmentedControl exposing (Msg, State, example, init, update)
|
||||
|
||||
import Html
|
||||
import ModuleExample exposing (Category(..), ModuleExample)
|
||||
import Nri.Ui.SegmentedControl.V1
|
||||
import Nri.Ui.SegmentedControl.V2
|
||||
|
||||
|
||||
{-| -}
|
||||
@ -18,16 +18,16 @@ type Msg
|
||||
|
||||
{-| -}
|
||||
type alias State =
|
||||
Nri.Ui.SegmentedControl.V1.Config Id Msg
|
||||
Nri.Ui.SegmentedControl.V2.Config Id Msg
|
||||
|
||||
|
||||
{-| -}
|
||||
example : (Msg -> msg) -> State -> ModuleExample msg
|
||||
example parentMessage state =
|
||||
{ filename = "Nri/Ui/SegmentedControl/V1.elm"
|
||||
{ filename = "Nri/Ui/SegmentedControl/V2.elm"
|
||||
, category = Behaviors
|
||||
, content =
|
||||
[ Html.map parentMessage (Nri.Ui.SegmentedControl.V1.view state)
|
||||
[ Html.map parentMessage (Nri.Ui.SegmentedControl.V2.view state)
|
||||
]
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@ import Html.Attributes exposing (..)
|
||||
import ModuleExample exposing (Category(..), ModuleExample)
|
||||
import Navigation
|
||||
import Nri.Ui.AssetPath as AssetPath exposing (Asset(Asset))
|
||||
import Nri.Ui.SegmentedControl.V1
|
||||
import Nri.Ui.SegmentedControl.V2
|
||||
import Nri.Ui.Text.V1 as Text
|
||||
import Nri.Ui.TextArea.V1 as TextArea
|
||||
import String.Extra
|
||||
@ -120,7 +120,7 @@ styles =
|
||||
[ -- NOTE: these will go away as the modules' styles are integrated with Nri.Css.Site.elm
|
||||
[ ModuleExample.styles
|
||||
]
|
||||
, (Nri.Ui.SegmentedControl.V1.styles |> .css) ()
|
||||
, (Nri.Ui.SegmentedControl.V2.styles |> .css) ()
|
||||
, (Text.styles |> .css) ()
|
||||
, (TextArea.styles |> .css) assets
|
||||
]
|
||||
|
Loading…
Reference in New Issue
Block a user