mirror of https://github.com/status-im/consul.git
25 lines
658 B
Handlebars
25 lines
658 B
Handlebars
<StateChart
|
|
@src={{state-chart 'boolean'}}
|
|
@initial={{if @expanded 'true' 'false'}}
|
|
as |State Guard Action dispatch state|>
|
|
{{#let (hash
|
|
toggle=(fn dispatch 'TOGGLE')
|
|
close=(fn dispatch 'FALSE')
|
|
open=(fn dispatch 'TRUE')
|
|
expanded=(state-matches state 'true')
|
|
event=state.context
|
|
button=(unique-id)
|
|
controls=this.ids
|
|
) as |_api|}}
|
|
{{#let (assign _api (hash
|
|
Action=(component 'disclosure/action' disclosure=_api)
|
|
Details=(component 'disclosure/details' disclosure=(hash
|
|
add=this.add
|
|
remove=this.remove
|
|
expanded=(state-matches state 'true')
|
|
))
|
|
)) as |api|}}
|
|
{{yield api}}
|
|
{{/let}}
|
|
{{/let}}
|
|
</StateChart> |