Created
June 5, 2020 16:18
-
-
Save Nyrox/db24eafaeee38d607cd4f8e26671069d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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