Created
July 18, 2023 04:38
-
-
Save geraldodev/dba59933b7e27dd3f75631ff042f0d53 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
(ns helix-ui.registry.default.example.progress-demo | |
(:require ["react" :as React] | |
[helix-ui.registry.default.ui.progress :refer [Progress]] | |
[helix.core :refer [$]] | |
[portfolio.react-18 :as portfolio :refer-macros [defscene]])) | |
(defscene ProgressDemo | |
:id | |
:helix-ui.portfolio.default.progress/demo | |
[] | |
(let [[progress setProgress] (.useState React 13)] | |
(.useEffect React | |
(fn [] | |
(let [timer (js/setTimeout (fn [] (setProgress 66)) | |
500)] | |
(fn [] (js/clearTimeout timer)))) | |
#js []) | |
($ Progress {:value progress, :className "w-[60%]"}))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment