mirror of
https://github.com/wassname/Open-Assistant.git
synced 2026-06-30 16:40:05 +08:00
Color-mode specific styling for LoadingScreen
This commit is contained in:
@@ -1,13 +1,15 @@
|
||||
import { Box, Progress, Text } from "@chakra-ui/react";
|
||||
import { Box, Center, Progress, Text, useColorModeValue } from "@chakra-ui/react";
|
||||
|
||||
export const LoadingScreen = ({ text = "Loading..." } = {}) => {
|
||||
const mainBgClasses = useColorModeValue("bg-slate-300 text-gray-900", "bg-slate-900 text-white");
|
||||
|
||||
return (
|
||||
<Box width="full">
|
||||
<Box width="full" className={mainBgClasses}>
|
||||
<Progress size="sm" isIndeterminate />
|
||||
{text && (
|
||||
<Box width="full">
|
||||
<Center width="full" className="p-12">
|
||||
<Text fontFamily="Inter">{text}</Text>
|
||||
</Box>
|
||||
</Center>
|
||||
)}
|
||||
</Box>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user