V2 General Fixes (#4038)
This commit is contained in:
1 parent
f5e394bb57
commit
e17c463890
11 files changed
+52
-26
No files matched your search
@@ -43,6 +43,8 @@ const variantClassName = {
|
||||
secondary: "border border-gray-200 text-brand-900 bg-white hover:bg-gray-100",
|
||||
minimal:
|
||||
"text-gray-700 bg-transparent hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-offset-1 focus:bg-gray-100 focus:ring-brand-900 dark:text-darkgray-900 hover:dark:text-gray-50",
|
||||
minimalSecondary:
|
||||
"text-gray-700 bg-transparent hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-offset-1 focus:bg-gray-100 focus:ring-brand-900 dark:text-darkgray-900 hover:dark:text-gray-50 border border-transparent hover:border-gray-300",
|
||||
destructive:
|
||||
"text-gray-700 bg-transparent hover:bg-red-100 hover:text-red-700 focus:outline-none focus:ring-2 focus:ring-offset-1 focus:bg-red-100 focus:ring-red-700",
|
||||
};
|
||||
@@ -50,6 +52,7 @@ const variantDisabledClassName = {
|
||||
primary: "border border-transparent bg-brand-500 bg-opacity-20 text-white",
|
||||
secondary: "border border-gray-200 text-brand-900 bg-white opacity-30",
|
||||
minimal: "text-gray-400 bg-transparent",
|
||||
minimalSecondary: "text-gray-400 bg-transparent",
|
||||
destructive: "text-red-700 bg-transparent opacity-30",
|
||||
};
|
||||
|
||||
@@ -84,10 +87,12 @@ export const Button = forwardRef<HTMLAnchorElement | HTMLButtonElement, ButtonPr
|
||||
// base styles independent what type of button it is
|
||||
"inline-flex justify-center items-center text-sm font-medium relative",
|
||||
// different styles depending on size
|
||||
size === "base" && "h-9 px-4 py-2.5 rounded-md ",
|
||||
size === "lg" && "h-[36px] px-4 py-2.5 rounded-md",
|
||||
size === "icon" && "flex justify-center h-[36px] w-[36px] rounded-md",
|
||||
combined && "rounded-none first:border-r-0 last:border-l-0 first:rounded-l-md last:rounded-r-md ",
|
||||
size === "base" && "h-9 px-4 py-2.5 ",
|
||||
size === "lg" && "h-[36px] px-4 py-2.5 ",
|
||||
size === "icon" && "flex justify-center h-[36px] w-[36px] ",
|
||||
combined
|
||||
? "rounded-none first:border-r-0 last:border-l-0 first:rounded-l-md last:rounded-r-md "
|
||||
: "rounded-md",
|
||||
// different styles depending on color
|
||||
// set not-allowed cursor if disabled
|
||||
disabled ? variantDisabledClassName[color] : variantClassName[color],
|
||||
|
||||
@@ -23,7 +23,7 @@ export default function EmptyScreen({
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
<div className="min-h-80 my-6 flex w-full flex-col items-center justify-center rounded-sm border border-dashed p-7 lg:p-20">
|
||||
<div className="min-h-80 flex w-full flex-col items-center justify-center rounded-md border border-dashed p-7 lg:p-20">
|
||||
<div className="flex h-[72px] w-[72px] items-center justify-center rounded-full bg-gray-200 dark:bg-white">
|
||||
<Icon className="inline-block h-10 w-10 text-white dark:bg-gray-900 dark:text-gray-600" />
|
||||
</div>
|
||||
|
||||
@@ -18,12 +18,15 @@ const Switch = (
|
||||
<PrimitiveSwitch.Root
|
||||
className={classNames(
|
||||
props.checked ? "bg-gray-900" : "bg-gray-200 hover:bg-gray-300",
|
||||
"focus:ring-brand-800 h-[24px] w-[40px] rounded-full p-0.5 shadow-none focus:ring-1"
|
||||
"focus:ring-brand-800 h-[24px] w-[40px] rounded-full p-0.5 shadow-inner focus:ring-1"
|
||||
)}
|
||||
{...primitiveProps}>
|
||||
<PrimitiveSwitch.Thumb
|
||||
id={id}
|
||||
className="block h-[18px] w-[18px] translate-x-0 rounded-full bg-white transition-transform"
|
||||
className={classNames(
|
||||
"block h-[18px] w-[18px] translate-x-0 rounded-full bg-white shadow-md transition-transform",
|
||||
props.checked && "shadow-inner"
|
||||
)}
|
||||
/>
|
||||
</PrimitiveSwitch.Root>
|
||||
{label && (
|
||||
|
||||
@@ -11,10 +11,16 @@ const tabs: VerticalTabItemProps[] = [
|
||||
href: "/bookings/upcoming",
|
||||
icon: Icon.FiCalendar,
|
||||
},
|
||||
// TODO: Add filter for unconfimred bookings in a future PR - Out of scope
|
||||
// {
|
||||
// name: "unconfirmed",
|
||||
// href: "/bookings/unconfirmed",
|
||||
// icon: Icon.FiInbox,
|
||||
// },
|
||||
{
|
||||
name: "Unconfirmed",
|
||||
href: "/bookings/unconfirmed",
|
||||
icon: Icon.FiInbox,
|
||||
name: "recurring",
|
||||
href: "/bookings/recurring",
|
||||
icon: Icon.FiRotateCcw,
|
||||
},
|
||||
{
|
||||
name: "past",
|
||||
|
||||
@@ -7,6 +7,7 @@ import { FC, Fragment, MouseEventHandler } from "react";
|
||||
import classNames from "@calcom/lib/classNames";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { SVGComponent } from "@calcom/types/SVGComponent";
|
||||
import { Icon } from "@calcom/ui/Icon";
|
||||
|
||||
export type VerticalTabItemProps = {
|
||||
name: string;
|
||||
@@ -74,11 +75,15 @@ const VerticalTabItem: FC<VerticalTabItemProps> = ({ name, href, tabName, info,
|
||||
<p>{t(name)}</p>
|
||||
{info && <p className="pt-1 text-xs font-normal">{t(info)}</p>}
|
||||
</div>
|
||||
{/* {isCurrent && (
|
||||
{isCurrent && (
|
||||
<div className="ml-auto self-center">
|
||||
<ChevronRight width={20} height={20} className="h-auto w-[20px] stroke-[1.5px]" />
|
||||
<Icon.FiChevronRight
|
||||
width={20}
|
||||
height={20}
|
||||
className="h-auto w-[20px] stroke-[1.5px] text-gray-700"
|
||||
/>
|
||||
</div>
|
||||
)} */}
|
||||
)}
|
||||
</a>
|
||||
</Link>
|
||||
{props.children?.map((child) => (
|
||||
|
||||
@@ -43,12 +43,12 @@ export const Day = ({
|
||||
<button
|
||||
style={props.disabled ? { ...disabledDateButtonEmbedStyles } : { ...enabledDateButtonEmbedStyles }}
|
||||
className={classNames(
|
||||
"disabled:text-bookinglighter absolute top-0 left-0 right-0 bottom-0 mx-auto w-full rounded-md border-2 border-transparent text-center font-medium hover:bg-gray-300 disabled:cursor-default disabled:border-transparent disabled:font-light dark:hover:border-white disabled:dark:border-transparent",
|
||||
"disabled:text-bookinglighter absolute top-0 left-0 right-0 bottom-0 mx-auto w-full rounded-md border-2 border-transparent text-center font-medium disabled:cursor-default disabled:border-transparent disabled:font-light dark:hover:border-white disabled:dark:border-transparent",
|
||||
active
|
||||
? "dark:bg-darkmodebrand dark:text-darkmodebrandcontrast bg-brand text-brandcontrast border-2"
|
||||
: !props.disabled
|
||||
? "dark:bg-darkgray-200 bg-gray-100 dark:text-white"
|
||||
: "hover:bg-transparent"
|
||||
? "dark:bg-darkgray-200 bg-gray-100 hover:bg-gray-300 dark:text-white"
|
||||
: ""
|
||||
)}
|
||||
data-testid="day"
|
||||
data-disabled={props.disabled}
|
||||
|
||||
Reference in new issue
Block a user