Skip to content

Commit

Permalink
fix code sample and controls
Browse files Browse the repository at this point in the history
  • Loading branch information
charbelrami committed Oct 4, 2024
1 parent 935b60a commit f861d13
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions component-catalog/src/Examples/LoadingShimmer.elm
Original file line number Diff line number Diff line change
Expand Up @@ -100,15 +100,17 @@ init =

{-| -}
type Msg
= NoOp
= UpdateControl (Control (List ( String, LoadingShimmer.Attribute Msg )))



{-| -}
update : Msg -> State -> ( State, Cmd Msg )
update msg state =
case msg of
NoOp ->
( state, Cmd.none )
UpdateControl newControl ->
( { state | control = newControl }, Cmd.none )




Expand Down Expand Up @@ -164,7 +166,7 @@ controlAttributes =
-- )
|> ControlExtra.listItems "Type"
(Control.list
|> ControlExtra.optionalListItem "type"
|> ControlExtra.listItem "kind"
(CommonControls.choice moduleName
[ ( "line", LoadingShimmer.line )
]
Expand Down Expand Up @@ -201,7 +203,7 @@ viewLoadingShimmerExamples ellieLinkConfig state =
{ ellieLinkConfig = ellieLinkConfig
, name = moduleName
, version = version
, update = always NoOp
, update = UpdateControl
, settings = state.control
, mainType = Just "RootHtml.Html msg"
, extraCode = []
Expand All @@ -220,7 +222,7 @@ viewLoadingShimmerExamples ellieLinkConfig state =
++ "\n ]"
}
in
[ toExampleCode "line"
[ toExampleCode "view"
]
}
, Heading.h2
Expand Down

0 comments on commit f861d13

Please sign in to comment.