Fix text color for OutfitPreview
Oops, I never actually saw the practically invisible text in light mode! Let's make it actually dark in light mode item pages, and still dark in all wardrobe pages!
This commit is contained in:
parent
b0eeb84d63
commit
9e49b6ae3e
2 changed files with 17 additions and 12 deletions
|
@ -7,6 +7,7 @@ import OutfitThumbnail, {
|
||||||
getOutfitThumbnailRenderSize,
|
getOutfitThumbnailRenderSize,
|
||||||
} from "../components/OutfitThumbnail";
|
} from "../components/OutfitThumbnail";
|
||||||
import OutfitPreview from "../components/OutfitPreview";
|
import OutfitPreview from "../components/OutfitPreview";
|
||||||
|
import { DarkMode } from "@chakra-ui/react";
|
||||||
|
|
||||||
function WardrobeOutfitPreview({
|
function WardrobeOutfitPreview({
|
||||||
isLoading,
|
isLoading,
|
||||||
|
@ -14,6 +15,7 @@ function WardrobeOutfitPreview({
|
||||||
onChangeHasAnimations,
|
onChangeHasAnimations,
|
||||||
}) {
|
}) {
|
||||||
return (
|
return (
|
||||||
|
<DarkMode>
|
||||||
<OutfitPreview
|
<OutfitPreview
|
||||||
isLoading={isLoading}
|
isLoading={isLoading}
|
||||||
speciesId={outfitState.speciesId}
|
speciesId={outfitState.speciesId}
|
||||||
|
@ -24,6 +26,7 @@ function WardrobeOutfitPreview({
|
||||||
onChangeHasAnimations={onChangeHasAnimations}
|
onChangeHasAnimations={onChangeHasAnimations}
|
||||||
backdrop={<OutfitThumbnailIfCached outfitId={outfitState.id} />}
|
backdrop={<OutfitThumbnailIfCached outfitId={outfitState.id} />}
|
||||||
/>
|
/>
|
||||||
|
</DarkMode>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
import React from "react";
|
import React from "react";
|
||||||
import { Box, DarkMode, Flex, Text } from "@chakra-ui/react";
|
import { Box, DarkMode, Flex, Text, useColorModeValue } from "@chakra-ui/react";
|
||||||
import { WarningIcon } from "@chakra-ui/icons";
|
import { WarningIcon } from "@chakra-ui/icons";
|
||||||
import { ClassNames } from "@emotion/react";
|
import { ClassNames } from "@emotion/react";
|
||||||
import { CSSTransition, TransitionGroup } from "react-transition-group";
|
import { CSSTransition, TransitionGroup } from "react-transition-group";
|
||||||
|
@ -77,11 +77,13 @@ export function useOutfitPreview({
|
||||||
}
|
}
|
||||||
}, [layersHaveAnimations, onChangeHasAnimations]);
|
}, [layersHaveAnimations, onChangeHasAnimations]);
|
||||||
|
|
||||||
|
const textColor = useColorModeValue("green.700", "white");
|
||||||
|
|
||||||
let preview;
|
let preview;
|
||||||
if (error || error2) {
|
if (error || error2) {
|
||||||
preview = (
|
preview = (
|
||||||
<FullScreenCenter>
|
<FullScreenCenter>
|
||||||
<Text color="green.50" d="flex" alignItems="center">
|
<Text color={textColor} d="flex" alignItems="center">
|
||||||
<WarningIcon />
|
<WarningIcon />
|
||||||
<Box width={2} />
|
<Box width={2} />
|
||||||
Could not load preview. Try again?
|
Could not load preview. Try again?
|
||||||
|
|
Loading…
Reference in a new issue