Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
export const ThemeObjectDisplay: React.FC<{}> = () => {
const theme = useTheme();
const themeKeys = Object.keys(theme);
const reducedTheme = {};
themeKeys.forEach(key => {
reducedTheme[key] = {};
});
return (
{prettyFormat(reducedTheme)}
);
};
export const SiteHeader: React.FC<{}> = () => {
const theme = useTheme();
return (
export const TextColorBox: React.FC = ({color, textColor}) => {
const theme = useTheme();
const colorFn = Color(color);
const isInverse = colorFn.isLight();
const backgroundColorValue = isInverse
? theme.backgroundColors.colorBackgroundInverse
: theme.backgroundColors.colorBackgroundBody;
const colorCombos = ColorCombos([color, backgroundColorValue]);
const {accessibility} = colorCombos[1].combinations[0];
const getContrastRating = (acc: ColorCombinationAccessibility): string => {
const rating = colorRating(acc);
return rating.small;
};
return (