From 17654b885b310f78295cf76b2b8c1f03590df0ae Mon Sep 17 00:00:00 2001 From: Felix Roos Date: Fri, 24 Mar 2023 12:41:00 +0100 Subject: [PATCH] feat: add loader bar to animate loading state --- website/src/repl/Loader.jsx | 13 +++++++++++++ website/src/repl/Repl.jsx | 2 ++ website/tailwind.config.cjs | 9 +++++++++ 3 files changed, 24 insertions(+) create mode 100644 website/src/repl/Loader.jsx diff --git a/website/src/repl/Loader.jsx b/website/src/repl/Loader.jsx new file mode 100644 index 00000000..0c629402 --- /dev/null +++ b/website/src/repl/Loader.jsx @@ -0,0 +1,13 @@ +import { cx } from '@strudel.cycles/react'; +import React from 'react'; + +function Loader({ active }) { + return ( +
+
+
+
+
+ ); +} +export default Loader; diff --git a/website/src/repl/Repl.jsx b/website/src/repl/Repl.jsx index 70b5229e..67b368ad 100644 --- a/website/src/repl/Repl.jsx +++ b/website/src/repl/Repl.jsx @@ -18,6 +18,7 @@ import * as tunes from './tunes.mjs'; import PlayCircleIcon from '@heroicons/react/20/solid/PlayCircleIcon'; import { themes } from './themes.mjs'; import { settingsMap, useSettings, setLatestCode } from '../settings.mjs'; +import Loader from './Loader'; const { latestCode } = settingsMap.get(); @@ -260,6 +261,7 @@ export function Repl({ embedded = false }) { // 'bg-gradient-to-t from-green-900 to-slate-900', // )} > +