mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-07-16 01:10:06 +08:00
Darkmode for survey pages. Fixes for eslint.
This commit is contained in:
@@ -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