UNPKG

@datalayer/core

Version:
22 lines (21 loc) 665 B
import { jsx as _jsx } from "react/jsx-runtime"; /* * Copyright (c) 2023-2025 Datalayer, Inc. * Distributed under the terms of the Modified BSD License. */ import { useState } from 'react'; import { useInterval } from 'usehooks-ts'; import { ProgressBar as PrimerProgressBar } from '@primer/react'; export const ProgressBar = () => { const [progress, setProgress] = useState(0); useInterval(() => { if (progress >= 100) { setProgress(0); } else { setProgress(progress + 1); } }, 100); return _jsx(PrimerProgressBar, { progress: progress, "aria-label": "" }); }; export default ProgressBar;