Files
DefectingCat.github.io/lib/hooks/useGetColors.ts
Defectink 37bd011bf4 Add comment skeleton for post omment
* change Giscus dark theme to dark_dimmed
2021-12-11 11:47:02 +08:00

40 lines
981 B
TypeScript

import { useColorModeValue } from '@chakra-ui/react';
interface UseGetColors {
boxBg: string;
textColor: string;
bioColor: string;
headingColor: string;
bgColor: string;
giscusColor: 'light' | 'dark_dimmed';
borderColor: string;
}
const useGetColors = (): UseGetColors => {
const boxBg = useColorModeValue('white', 'gray.700');
const textColor = useColorModeValue('gray.600', 'whiteAlpha.900');
const bioColor = useColorModeValue('gray.400', 'whiteAlpha.600');
const headingColor = useColorModeValue(
'rgba(0, 0, 0, 0.85)',
'whiteAlpha.800'
);
const borderColor = useColorModeValue('gray.300', 'whiteAlpha.300');
// Body and search background color
const bgColor = useColorModeValue('home.bg', 'gray.800');
// comment
const giscusColor = useColorModeValue('light', 'dark_dimmed');
return {
boxBg,
textColor,
bioColor,
headingColor,
giscusColor,
bgColor,
borderColor,
};
};
export default useGetColors;