File tree Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Expand file tree Collapse file tree 1 file changed +13
-4
lines changed Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ import Ui.DateRangePicker
1212import Ui.DatePicker
1313import Ui.Calendar exposing (..)
1414import Html exposing (..)
15+ import Html.Attributes exposing (class )
1516import Ui.Helpers.Dropdown as Dropdown exposing (Dropdown )
1617
1718
@@ -108,13 +109,21 @@ update msg_ model =
108109 ( { model | readOnly = updatedModel }, Cmd . none )
109110
110111
112+ uiSnapshot : String -> String -> Html Msg -> Html Msg
113+ uiSnapshot title key ui =
114+ div [ class key ]
115+ [ text title
116+ , ui
117+ ]
118+
119+
111120view : Model -> Html .Html Msg
112121view model =
113122 div []
114- [ Html . map Simple ( Ui . DateRangePicker . view " en_us" model. simple)
115- , Html . map OneDisabled ( Ui . DateRangePicker . view " en_us" model. oneDisabled)
116- , Html . map WithPreselectedDates ( Ui . DateRangePicker . view " en_us" model. withPreselectedDates)
117- , Html . map ReadOnly ( Ui . DateRangePicker . view " en_us" model. readOnly)
123+ [ uiSnapshot " Without Presets " " without-presets " ( Html . map Simple ( Ui . DateRangePicker . view " en_us" model. simple) )
124+ , uiSnapshot " With One Disabled Date Picker " " one-disabled " ( Html . map OneDisabled ( Ui . DateRangePicker . view " en_us" model. oneDisabled) )
125+ , uiSnapshot " With Preselected Dates " " preselected " ( Html . map WithPreselectedDates ( Ui . DateRangePicker . view " en_us" model. withPreselectedDates) )
126+ , uiSnapshot " With A Readonly Date Picker " " readonly " ( Html . map ReadOnly ( Ui . DateRangePicker . view " en_us" model. readOnly) )
118127 ]
119128
120129
You can’t perform that action at this time.
0 commit comments