diff --git a/packages/atoms/availabilitylist/AvailabilityList.tsx b/packages/atoms/availabilitylist/AvailabilityList.tsx new file mode 100644 index 0000000000..302ba67d8b --- /dev/null +++ b/packages/atoms/availabilitylist/AvailabilityList.tsx @@ -0,0 +1,15 @@ +import { EmptyScreen } from " ./EmptyScreen"; + +export function AvailabilityList({ schedules }: []) { + return ( + <> + {schedules.length === 0 ? ( +
+ +
+ ) : ( +
Render availability list here
+ )} + + ); +} diff --git a/packages/atoms/availabilitylist/EmptyScreen.tsx b/packages/atoms/availabilitylist/EmptyScreen.tsx new file mode 100644 index 0000000000..16964678b9 --- /dev/null +++ b/packages/atoms/availabilitylist/EmptyScreen.tsx @@ -0,0 +1,66 @@ +import type { LucideIcon as IconType } from "lucide-react"; +import type { ReactNode } from "react"; +import React from "react"; + +import { classNames } from "@calcom/lib"; +import type { SVGComponent } from "@calcom/types/SVGComponent"; + +export function EmptyScreen({ + Icon, + avatar, + headline, + description, + buttonText, + buttonOnClick, + buttonRaw, + border = true, + dashedBorder = true, + className, +}: { + Icon?: SVGComponent | IconType; + avatar?: React.ReactElement; + headline: string | React.ReactElement; + description?: string | React.ReactElement; + buttonText?: string; + buttonOnClick?: (event: React.MouseEvent) => void; + buttonRaw?: ReactNode; // Used incase you want to provide your own button. + border?: boolean; + dashedBorder?: boolean; +}) { + return ( + <> +
+ {!avatar ? null : ( +
{avatar}
+ )} + {!Icon ? null : ( +
+ +
+ )} +
+

+ {headline} +

+ {description && ( +
+ {description} +
+ )} + {buttonRaw} +
+
+ + ); +} diff --git a/packages/atoms/availabilitylist/export.ts b/packages/atoms/availabilitylist/export.ts new file mode 100644 index 0000000000..a5fc4c913c --- /dev/null +++ b/packages/atoms/availabilitylist/export.ts @@ -0,0 +1,2 @@ +export { AvailabilityList } from "./AvailabilityList"; +export * from "../types";