Skip to content

Commit

Permalink
#3
Browse files Browse the repository at this point in the history
  • Loading branch information
SchlenkR committed Apr 28, 2023
1 parent ef7ae4e commit e6f186d
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Vide.Fable/src/DevApp/src/DevApp.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<Compile Include="UseCases\Async.fs" />
<Compile Include="UseCases\Advanced.fs" />
<Compile Include="UseCases\TodoList.fs" />
<Compile Include="UseCases\Issue_2.fs" />
<Compile Include="UseCases\Issue_3.fs" />
<Compile Include="App.fs" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ module Issue_2 =
| None -> Vide.elseForget
}


let cards() = vide {
Card(
vide {
Expand Down Expand Up @@ -55,7 +54,6 @@ module Issue_2a =
| None -> Vide.elseForget
}


let cards = vide {
Card(
vide {
Expand All @@ -74,6 +72,44 @@ module Issue_2a =
let view = vide { article { main { cards } } }


module Issue_2b =

open Vide
open type Vide.Html

let Card
(
content: Vide<_,_,_>,
footerContent: Vide<_,_,_> option
) =
vide {
div { content }

match footerContent with
| Some footerContent -> header { footerContent }
| None -> Vide.elseForget
}

let videNone : Vide<unit,unit,_> option = None

let cards = vide {
Card(
vide {
let! counter = Vide.ofMutable 0
$"The current count is {counter.Value} :)"
},
Some (vide { "Footer is here" })
)

Card(
vide { "This is just another Usage" },
videNone
)
}

let view = vide { article { main { cards } } }


//module Issue_2b =

// open Vide
Expand Down

0 comments on commit e6f186d

Please sign in to comment.