added dark mode upgrade banner (#8172)

This commit is contained in:
Peer Richelsen authored and GitHub committed 2023-04-10 21:14:28 +00:00
1 parent 21e454d0e2
commit cdab9037ce
7 files changed
+14 -24

No files matched your search

@@ -68,10 +68,8 @@ export function TeamsListing() {
<UpgradeTip
title="calcom_is_better_with_team"
description="add_your_team_members"
emptyTitle="no_teams"
emptyDescription="no_teams_description"
features={features}
background="/tips/teams.jpg"
background="/tips/teams"
buttons={
<div className="space-y-2 rtl:space-x-reverse sm:space-x-2">
<ButtonGroup>
+9 -13
View File
@@ -1,4 +1,3 @@
import Image from "next/image";
import type { ReactNode } from "react";
import { classNames } from "@calcom/lib";
@@ -8,8 +7,6 @@ import { useLocale } from "@calcom/lib/hooks/useLocale";
export function UpgradeTip({
dark,
title,
emptyTitle,
emptyDescription,
description,
background,
features,
@@ -21,8 +18,6 @@ export function UpgradeTip({
title: string;
description: string;
/* overwrite EmptyScreen text */
emptyTitle?: string;
emptyDescription?: string;
background: string;
features: Array<{ icon: JSX.Element; title: string; description: string }>;
buttons?: JSX.Element;
@@ -40,14 +35,15 @@ export function UpgradeTip({
return (
<>
<div className="relative flex min-h-[295px] w-full items-center justify-between overflow-hidden rounded-lg pb-10">
<Image
alt={title}
src={background}
className="absolute min-h-[295px] w-full rounded-lg object-cover"
height={295}
width={1118}
quality={100}
/>
<picture className="absolute min-h-[295px] w-full rounded-lg object-cover">
<source srcSet={`${background}-dark.jpg`} media="(prefers-color-scheme: dark)" />
<img
className="absolute min-h-[295px] w-full rounded-lg object-cover"
src={`${background}.jpg`}
loading="lazy"
alt={title}
/>
</picture>
<div className="relative mt-4 px-8 sm:px-14">
<h1 className={classNames("font-cal text-3xl", dark && "text-inverted")}>{t(title)}</h1>
<p className={classNames("mt-4 mb-8 max-w-sm", dark ? "text-inverted" : "text-default")}>