Files
calendar/packages/app-store/routing-forms/components/_components/EmptyState.tsx
T
Bailey PumfleetGitHubPedro CastroDevin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
7c66f33de2 chore: UX Fixes (#26643)
* Copy changes

* Move search bar inline with new button

* Get rid of no more results message

* Change hidden badge to (hidden)

* Remove Cal.ai badge from sidebar

* Add dropdown to create button when there is multiple options

* Fix delete dialog

* Saved filters updates

* More string fixes

* Switch members table to use names

* Fix member spacing

* Fix routing form identifier field

* Fix routing forms stuff

* Only show SMS hint on SMS options

* Make workflow delete button minimal

* Fix padding on workflow steps

* Remove min width on workflow title

* Fix delete workflow PR

* Fix org profile buttons

* Fix org profile screen partially scrolled down

* Improve logos & banner uploads

* Personal profile fixes

* Fix settings general view stuff

* Sentence case consistency

* Fix stuff I broke

* Fix fab

* Fix hidden translation string

* Fix text fields

* Make button small for solo users too

* fix: update E2E tests to match sentence case labels in routing forms

* fix: update tests to match sentence case label changes

- insights.e2e.ts: chart titles (14 strings)
- event-types.e2e.ts: Organizer phone number location
- EditLocationDialog.test.tsx: phone number labels

* fix: address Cubic AI review feedback (confidence 9+)

- Replace hardcoded text-gray-500 with text-muted in TextField.tsx hint section
- Replace text locator with data-testid in E2E test for location select

Co-Authored-By: unknown <>

* fix: update E2E tests for sentence case label changes

- Use data-testid selectors for location options (more reliable than text)
- Update field identifiers in routing-forms tests to match new labels
- Fix Long text selector in manage-booking-questions test

* fix: replace text locator with data-testid in manage-booking-questions E2E test

Replace fragile text="Long text" locator with resilient
page.getByTestId("select-option-textarea") selector per E2E best practices.

Addresses Cubic AI review feedback (confidence 9/10).

Co-Authored-By: unknown <>

* fix: use .last() for multiple location select items

---------

Co-authored-by: Pedro Castro <pedro@cal.com>
Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
2026-01-13 00:56:08 -05:00

68 lines
2.1 KiB
TypeScript

import { Button } from "@calcom/ui/components/button";
import { Icon, type IconName } from "@calcom/ui/components/icon";
type EmptyStateProps = {
icon: IconName;
header: string;
text: string;
buttonText: string;
buttonOnClick: () => void;
buttonStartIcon?: IconName;
buttonClassName?: string;
buttonDataTestId?: string;
};
export const EmptyState = ({
icon,
header,
text,
buttonText,
buttonOnClick,
buttonStartIcon = "plus",
buttonClassName,
buttonDataTestId,
}: EmptyStateProps) => {
return (
<div className="border-subtle bg-cal-muted flex flex-col items-center gap-6 rounded-xl border p-11">
<div className="mb-3 grid">
{/* Icon card - Top */}
<div className="bg-default border-subtle z-30 col-start-1 col-end-1 row-start-1 row-end-1 h-10 w-10 transform rounded-md border shadow-sm">
<div className="flex h-full items-center justify-center">
<Icon name={icon} className="text-emphasis h-4 w-4" />
</div>
</div>
{/* Left fanned card */}
<div
className="bg-default border-subtle z-20 col-start-1 col-end-1 row-start-1 row-end-1 h-10 w-10 rounded-md border shadow-sm"
style={{
transform: "translate(-12px, 2px) rotate(-6deg)",
}}
/>
{/* Right fanned card */}
<div
className="bg-default border-subtle z-10 col-start-1 col-end-1 row-start-1 row-end-1 h-10 w-10 rounded-md border shadow-sm"
style={{
transform: "translate(12px, 2px) rotate(6deg)",
}}
/>
</div>
<div className="w-full">
<h1 className="text-emphasis line-clamp-1 text-center text-lg font-semibold">
{header}
</h1>
<p className="mt-2 line-clamp-1 text-center text-sm leading-normal transition-all duration-200 ease-in-out hover:line-clamp-none">
{text}
</p>
</div>
<Button
data-testid={buttonDataTestId}
StartIcon={buttonStartIcon}
onClick={buttonOnClick}
className={buttonClassName}
>
{buttonText}
</Button>
</div>
);
};