Skip to content

Commit

Permalink
run elm-format on preview/src/ReviewConfig
Browse files Browse the repository at this point in the history
  • Loading branch information
mateusfpleite committed Jun 10, 2024
1 parent 0cbb241 commit 3019161
Showing 1 changed file with 13 additions and 14 deletions.
27 changes: 13 additions & 14 deletions preview/src/ReviewConfig.elm
Original file line number Diff line number Diff line change
Expand Up @@ -11,30 +11,29 @@ when inside the directory containing this file.
-}

import Install.TypeVariant
import Install.FieldInTypeAlias
import Install.Initializer
import Install.ClauseInCase
import Install.FieldInTypeAlias
import Install.Function
import Install.Initializer
import Install.TypeVariant
import Review.Rule exposing (Rule)



config : List Rule
config =
[
Install.TypeVariant.makeRule "Types" "ToBackend" "CounterReset"
, Install.TypeVariant.makeRule "Types" "FrontendMsg" "Reset"
, Install.ClauseInCase.init "Frontend" "update" "Reset" "( { model | counter = 0 }, sendToBackend CounterReset )"
[ Install.TypeVariant.makeRule "Types" "ToBackend" "CounterReset"
, Install.TypeVariant.makeRule "Types" "FrontendMsg" "Reset"
, Install.ClauseInCase.init "Frontend" "update" "Reset" "( { model | counter = 0 }, sendToBackend CounterReset )"
|> Install.ClauseInCase.withInsertAfter "Increment"
|> Install.ClauseInCase.makeRule
, Install.ClauseInCase.init "Backend" "updateFromFrontend" "CounterReset" "( { model | counter = 0 }, broadcast (CounterNewValue 0 clientId) )"
, Install.ClauseInCase.init "Backend" "updateFromFrontend" "CounterReset" "( { model | counter = 0 }, broadcast (CounterNewValue 0 clientId) )"
|> Install.ClauseInCase.makeRule
, Install.Function.init ["Frontend"] "view" viewFunction |>Install.Function.makeRule

, Install.Function.init [ "Frontend" ] "view" viewFunction |> Install.Function.makeRule
]

viewFunction = """view model =

viewFunction =
"""view model =
Html.div [ style "padding" "50px" ]
[ Html.button [ onClick Increment ] [ text "+" ]
, Html.div [ style "padding" "10px" ] [ Html.text (String.fromInt model.counter) ]
Expand All @@ -44,12 +43,12 @@ viewFunction = """view model =
]"""


viewFunction2 = """view model =
viewFunction2 =
"""view model =
Html.div [ style "padding" "50px" ]
[ Html.button [ onClick Increment ] [ text "+" ]
, Html.div [ style "padding" "10px" ] [ Html.text (String.fromInt model.counter) ]
, Html.button [ onClick Decrement ] [ text "-" ]
, Html.div [ style "padding-top" "15px", style "padding-bottom" "15px" ] [ Html.text "Click me then refresh me!" ]
, Html.button [ onClick Reset ] [ text "Reset" ]
]"""

0 comments on commit 3019161

Please sign in to comment.