Files
calendar/packages/ui/v2/core/PageHeader.tsx
T
ccc2bdd25e 🧹 One calcom/ui import to rule them all (#5561)
* Removed emptyscreen component v1 version, migrated pages that still used it to v2, and removed v1 of workflow pages and components.

* updated workflow pages imports to remove v2 from path.

* Deleted v1 switch component, deleted v1 api-keys components, deleted old web integrations components that were unused.

* Removed v1 list component.

* Fixed event workflows tab path.

* Fixed import path for button in sandbox page.

* Cleanup and type fixes

* Making explicit indexes

* UI import migrations

* More import fixes

* More import fixes

* Submodule sync

* Type fixes

* Build fixes

Co-authored-by: zomars <zomars@me.com>
2022-11-22 19:55:25 -07:00

30 lines
926 B
TypeScript

import { ReactNode } from "react";
import { Badge, BadgeProps } from "../../components/badge";
type Props = {
title: string;
description?: string;
badgeText?: string;
badgeVariant?: BadgeProps["variant"];
infoIcon?: string;
rightAlignedComponent?: ReactNode;
};
function PageHeader({ title, description, rightAlignedComponent, badgeText, badgeVariant }: Props) {
return (
<div className="flex items-center">
<div className="mr-4 flex-col">
<div className="flex w-full items-center space-x-2">
<h1 className="font-cal text-xl font-semibold text-black">{title}</h1>
{badgeText && badgeVariant && <Badge variant={badgeVariant}>{badgeText}</Badge>}
</div>
<h2 className="text-sm text-gray-600">{description}</h2>
</div>
<div className="ml-auto ">{rightAlignedComponent && rightAlignedComponent}</div>
</div>
);
}
export default PageHeader;