Skip to content

Instantly share code, notes, and snippets.

@Nyrox
Created June 5, 2020 16:18
Show Gist options
  • Save Nyrox/db24eafaeee38d607cd4f8e26671069d to your computer and use it in GitHub Desktop.
Save Nyrox/db24eafaeee38d607cd4f8e26671069d to your computer and use it in GitHub Desktop.
let DirEntry =
React.FunctionComponent.Of
((fun name ->
let hidden = Hooks.useState false
let img =
img [ Src <| Utils.getStatic "icons/directory.svg" ]
let mutable className = "directory"
if hidden.current then className <- className + " hidden"
JS.console.log (ofString name)
li [ ClassName className; OnClick(fun _ -> hidden.update true)]
[ ofString "foo "]
), "DirEntry")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment