[REFACTOR] Components.Tab, make performAction a local def

parent 15465054
......@@ -27,6 +27,10 @@ tabs l p ls = withState \st ->
, wrapper $ fold $ mapWithIndex ( tab (activeTab st)) ls
]
where
performAction :: forall props.
PerformAction State props Action
performAction (ChangeTab i) _ _ =
void $ modifyState $ const i
activeTab = view l
wrapper = over _render \render d p s c ->
[div [className "tab-content"] $ render d p s c]
......@@ -44,11 +48,6 @@ tab sid iid (Tuple name spec) = over _render tabRender spec
]
performAction :: forall props.
PerformAction State props Action
performAction (ChangeTab i) _ _ =
void $ modifyState $ const i
render :: forall state props action.
State -> List (Tuple String (Spec state props action))
-> Render State props Action
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment