This repository has been archived by the owner on Jan 23, 2024. It is now read-only.
forked from calcom/cal.com
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: logo lack of contrast (calcom#12401)
Co-authored-by: Peer Richelsen <[email protected]>
- Loading branch information
Showing
2 changed files
with
12 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,15 @@ | ||
// we want to invert all logos that contain -dark in their name | ||
// we don't want to invert logos that are not coming from the app-store | ||
|
||
export default function invertLogoOnDark(url?: string) { | ||
return (url?.includes("-dark") || !url?.startsWith("/app-store")) && "dark:invert"; | ||
export default function invertLogoOnDark( | ||
url?: string, | ||
// The background color of the logo's display location is opposite of the general theme of the application. | ||
// Ex. General App theme is black but the logo's background color is white. | ||
opposite?: boolean | ||
) { | ||
return url?.includes("-dark") || !url?.startsWith("/app-store") | ||
? opposite | ||
? "invert dark:invert-0" | ||
: "dark:invert" | ||
: ""; | ||
} |