({
colorName,
varNames,
defaultColor,
isMissing,
}: {
colorName: string;
varNames: string[];
defaultColor: string;
isMissing?: boolean;
})
| 17 | } from "./theme"; |
| 18 | |
| 19 | const ThemeTailwindClassExample = ({ |
| 20 | colorName, |
| 21 | varNames, |
| 22 | defaultColor, |
| 23 | isMissing, |
| 24 | }: { |
| 25 | colorName: string; |
| 26 | varNames: string[]; |
| 27 | defaultColor: string; |
| 28 | isMissing?: boolean; |
| 29 | }) => { |
| 30 | return ( |
| 31 | <> |
| 32 | <div className={`line-clamp-1 break-all px-2 text-right`}> |
| 33 | {colorName} |
| 34 | </div> |
| 35 | <div |
| 36 | className={`line-clamp-1 break-all p-1 text-[9px] ${isMissing ? "text-error" : ""}`} |
| 37 | style={{ |
| 38 | backgroundColor: varWithFallback( |
| 39 | colorName as keyof typeof THEME_COLORS, |
| 40 | ), |
| 41 | }} |
| 42 | > |
| 43 | {varNames.join(", ")} |
| 44 | </div> |
| 45 | <div |
| 46 | className={`line-clamp-1 break-all p-1 text-[9px]`} |
| 47 | style={{ |
| 48 | backgroundColor: defaultColor, |
| 49 | }} |
| 50 | > |
| 51 | {defaultColor} |
| 52 | </div> |
| 53 | </> |
| 54 | ); |
| 55 | }; |
| 56 | |
| 57 | function ThemePage() { |
| 58 | const navigate = useNavigate(); |
nothing calls this directly
no test coverage detected