mirror of
https://github.com/nextui-org/nextui.git
synced 2025-12-08 19:26:11 +00:00
32 lines
565 B
TypeScript
32 lines
565 B
TypeScript
const App = `import {CircularProgress} from "@nextui-org/react";
|
|
|
|
export default function App() {
|
|
const [value, setValue] = React.useState(0);
|
|
|
|
React.useEffect(() => {
|
|
const interval = setInterval(() => {
|
|
setValue((v) => (v >= 100 ? 0 : v + 10));
|
|
}, 500);
|
|
|
|
return () => clearInterval(interval);
|
|
}, []);
|
|
|
|
return (
|
|
<CircularProgress
|
|
aria-label="Loading..."
|
|
size="lg"
|
|
value={value}
|
|
color="warning"
|
|
showValueLabel={true}
|
|
/>
|
|
);
|
|
}`;
|
|
|
|
const react = {
|
|
"/App.jsx": App,
|
|
};
|
|
|
|
export default {
|
|
...react,
|
|
};
|