mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-10-02 11:50:46 +08:00
Darkmode for survey pages. Fixes for eslint.
This commit is contained in:
1 parent
5f3d32b875
commit
3d13c7c91c
35 files changed
+4778
-330
No files matched your search
@@ -1,12 +1,18 @@
|
||||
import { Container, Progress } from "@chakra-ui/react";
|
||||
import { Progress } from "@chakra-ui/react";
|
||||
import { useColorMode } from "@chakra-ui/react";
|
||||
|
||||
export const LoadingScreen = ({ text }) => (
|
||||
<Container>
|
||||
<Progress size="xs" isIndeterminate />
|
||||
{text && (
|
||||
<Container className="flex h-full">
|
||||
<div className="text-xl font-bold text-gray-800 mx-auto my-auto">{text}</div>
|
||||
</Container>
|
||||
)}
|
||||
</Container>
|
||||
);
|
||||
export const LoadingScreen = ({ text }) => {
|
||||
const { colorMode } = useColorMode();
|
||||
const mainClasses = colorMode === "light" ? "bg-slate-300 text-gray-800" : "bg-slate-900 text-white";
|
||||
|
||||
return (
|
||||
<div className={`h-full ${mainClasses}`}>
|
||||
<Progress size="sm" isIndeterminate />
|
||||
{text && (
|
||||
<div className="flex h-full">
|
||||
<div className="text-xl font-bold mx-auto my-auto">{text}</div>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
Reference in new issue
Block a user