mirror of
https://github.com/NoRedInk/noredink-ui.git
synced 2025-01-06 22:49:38 +03:00
Use the flexible footer for the previous panel
This commit is contained in:
parent
8ffa4988bf
commit
468dcbc2a6
@ -220,26 +220,12 @@ viewPreviousPanel direction previousPanel =
|
|||||||
[ span [ Html.Styled.Attributes.id (panelId previousPanel) ] [ Html.text previousPanel.title ]
|
[ span [ Html.Styled.Attributes.id (panelId previousPanel) ] [ Html.text previousPanel.title ]
|
||||||
]
|
]
|
||||||
, viewContent previousPanel.content
|
, viewContent previousPanel.content
|
||||||
, Html.div
|
, viewFlexibleFooter
|
||||||
[ css
|
{ buttonLabel = previousPanel.buttonLabel
|
||||||
[ Css.displayFlex
|
, buttonMsg = ()
|
||||||
, Css.flexDirection Css.column
|
, buttonState = Button.Disabled
|
||||||
, Css.alignItems Css.center
|
}
|
||||||
, Css.margin4 (Css.px 20) Css.zero Css.zero Css.zero
|
[ InactiveDisabled () "" ]
|
||||||
]
|
|
||||||
]
|
|
||||||
[ Button.button
|
|
||||||
{ onClick = ()
|
|
||||||
, size = Button.Large
|
|
||||||
, style = Button.Primary
|
|
||||||
, width = Button.WidthExact 230
|
|
||||||
}
|
|
||||||
{ label = previousPanel.buttonLabel
|
|
||||||
, state = Button.Disabled
|
|
||||||
, icon = Nothing
|
|
||||||
}
|
|
||||||
, div [ css [ Css.marginTop (Css.px 16) ] ] []
|
|
||||||
]
|
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -333,11 +319,11 @@ viewActiveFooter { previous, current, upcoming } =
|
|||||||
|
|
||||||
viewFlexibleFooter :
|
viewFlexibleFooter :
|
||||||
{ buttonLabel : String
|
{ buttonLabel : String
|
||||||
, buttonMsg : State
|
, buttonMsg : msg
|
||||||
, buttonState : Button.ButtonState
|
, buttonState : Button.ButtonState
|
||||||
}
|
}
|
||||||
-> List Dot
|
-> List (Dot msg)
|
||||||
-> Html State
|
-> Html msg
|
||||||
viewFlexibleFooter { buttonLabel, buttonMsg, buttonState } dotList =
|
viewFlexibleFooter { buttonLabel, buttonMsg, buttonState } dotList =
|
||||||
Nri.Ui.styled div
|
Nri.Ui.styled div
|
||||||
"modal-footer"
|
"modal-footer"
|
||||||
@ -369,13 +355,13 @@ uncurry f ( a, b ) =
|
|||||||
f a b
|
f a b
|
||||||
|
|
||||||
|
|
||||||
type Dot
|
type Dot msg
|
||||||
= Active
|
= Active
|
||||||
| Inactive State String
|
| Inactive msg String
|
||||||
| InactiveDisabled State String
|
| InactiveDisabled msg String
|
||||||
|
|
||||||
|
|
||||||
dot : Dot -> Html.Html State
|
dot : Dot msg -> Html.Html msg
|
||||||
dot type_ =
|
dot type_ =
|
||||||
let
|
let
|
||||||
styles backgroundColor cursor =
|
styles backgroundColor cursor =
|
||||||
|
Loading…
Reference in New Issue
Block a user