feat: added customClassnames for event-setup tab (#17240)
* feat: added customClassnames for event-setup tab * Update EventTypePlatformWrapper.tsx * better classnames naming * added classNames to common types * updated classnames to use the common exported types * udpate * better classnames * better classname names * classnames -> classNames * added default styling * Update Locations.tsx * Update event-types.tsx * update * locationSelectCustomClassNames -> LocationSelectCustomClassNames * Update documentation.json * fix: better classnames * Update types.ts
This commit is contained in:
1 parent
ad44ca9f2a
commit
e477e5892c
5 files changed
+321
-42
No files matched your search
@@ -11,6 +11,7 @@ import type { EventTeamAssignmentTabCustomClassNames } from "@calcom/features/ev
|
||||
import type { EventAvailabilityTabCustomClassNames } from "@calcom/features/eventtypes/components/tabs/availability/EventAvailabilityTab";
|
||||
import type { EventLimitsTabCustomClassNames } from "@calcom/features/eventtypes/components/tabs/limits/EventLimitsTab";
|
||||
import type { EventRecurringTabCustomClassNames } from "@calcom/features/eventtypes/components/tabs/recurring/RecurringEventController";
|
||||
import type { EventSetupTabCustomClassNames } from "@calcom/features/eventtypes/components/tabs/setup/EventSetupTab";
|
||||
import type { EventTypeSetupProps, FormValues, TabMap } from "@calcom/features/eventtypes/lib/types";
|
||||
import { useLocale } from "@calcom/lib/hooks/useLocale";
|
||||
import { SchedulingType } from "@calcom/prisma/enums";
|
||||
@@ -37,6 +38,7 @@ export type PlatformTabs = keyof Omit<TabMap, "workflows" | "webhooks" | "instan
|
||||
|
||||
export type EventTypeCustomClassNames = {
|
||||
atomsWrapper?: string;
|
||||
eventSetupTab?: EventSetupTabCustomClassNames;
|
||||
eventLimitsTab?: EventLimitsTabCustomClassNames;
|
||||
eventAdvancedTab?: EventAdvancedTabCustomClassNames;
|
||||
eventAssignmentTab?: EventTeamAssignmentTabCustomClassNames;
|
||||
@@ -52,7 +54,7 @@ export type EventTypePlatformWrapperProps = {
|
||||
onDeleteSuccess?: () => void;
|
||||
onDeleteError?: (msg: string) => void;
|
||||
allowDelete: boolean;
|
||||
customClassNames?: eventTypeCustomClassNames;
|
||||
customClassNames?: EventTypeCustomClassNames;
|
||||
disableToasts?: boolean;
|
||||
};
|
||||
|
||||
@@ -156,6 +158,7 @@ const EventType = ({
|
||||
team={team}
|
||||
teamMembers={teamMembers}
|
||||
destinationCalendar={destinationCalendar}
|
||||
customClassNames={customClassNames?.eventSetupTab}
|
||||
/>
|
||||
) : (
|
||||
<></>
|
||||
|
||||
@@ -635,6 +635,92 @@ export default function Bookings(props: { calUsername: string; calEmail: string
|
||||
},
|
||||
},
|
||||
},
|
||||
eventSetupTab: {
|
||||
wrapper: "rounded-lg shadow-sm",
|
||||
titleSection: {
|
||||
container: "border border-purple-200 bg-purple-100 rounded-lg",
|
||||
titleInput: {
|
||||
container: "mb-4",
|
||||
label: "text-purple-700",
|
||||
input: "border border-purple-300 rounded-md text-purple-900 bg-white",
|
||||
addOn: "text-purple-500",
|
||||
},
|
||||
urlInput: {
|
||||
container: "mb-4",
|
||||
label: "text-purple-700",
|
||||
input: "border border-purple-300 rounded-md text-purple-900 bg-white",
|
||||
addOn: "text-purple-500",
|
||||
},
|
||||
descriptionInput: {
|
||||
label: "text-purple-700",
|
||||
input: "border border-purple-300 rounded-md text-purple-900 bg-white",
|
||||
},
|
||||
},
|
||||
durationSection: {
|
||||
container: "border border-purple-200 bg-purple-100 rounded-lg",
|
||||
singleDurationInput: {
|
||||
container: "mb-4",
|
||||
label: "text-purple-700",
|
||||
input: "border border-purple-300 rounded-md text-purple-900 bg-white",
|
||||
addOn: "text-purple-500",
|
||||
},
|
||||
multipleDuration: {
|
||||
container: "space-y-2",
|
||||
availableDurationsSelect: {
|
||||
container: "mb-4",
|
||||
label: "text-purple-700",
|
||||
select: "border border-purple-300 rounded-md text-purple-900 bg-purple-50",
|
||||
innerClassNames: {
|
||||
input: "text-purple-900",
|
||||
option: "text-purple-700 hover:bg-purple-200",
|
||||
control: "border-purple-300",
|
||||
singleValue: "text-purple-900",
|
||||
valueContainer: "bg-purple-100",
|
||||
multiValue: "bg-purple-200 rounded-md text-purple-900",
|
||||
menu: "border border-purple-200 rounded-md",
|
||||
menuList: "",
|
||||
},
|
||||
},
|
||||
defaultDurationSelect: {
|
||||
container: "mb-4",
|
||||
label: "text-purple-700",
|
||||
select: "border border-purple-300 rounded-md text-purple-900 bg-purple-50",
|
||||
},
|
||||
},
|
||||
selectDurationToggle: {
|
||||
container: "",
|
||||
label: "text-purple-700",
|
||||
description: "text-purple-500",
|
||||
children: "",
|
||||
},
|
||||
},
|
||||
locationSection: {
|
||||
container: "border border-purple-200 bg-purple-100 rounded-lg",
|
||||
label: "text-purple-700",
|
||||
locationSelect: {
|
||||
optionIcon: "text-purple-500",
|
||||
optionLabel: "text-purple-800",
|
||||
optionWrapper: "hover:bg-purple-200 rounded-md",
|
||||
groupLabel: "text-purple-700",
|
||||
selectWrapper: "border border-purple-300 rounded-md text-purple-900 bg-purple-50",
|
||||
},
|
||||
removeLocationButton: "text-purple-500 hover:bg-purple-200 rounded-md",
|
||||
removeLocationIcon: "text-purple-500",
|
||||
addLocationButton: "text-purple-500 hover:bg-purple-200 rounded-md",
|
||||
organizerContactInput: {
|
||||
errorMessage: "text-purple-500",
|
||||
locationInput: {
|
||||
addressInput: "border border-purple-300 rounded-md text-purple-900 bg-white",
|
||||
phoneInput: "border border-purple-300 rounded-md text-purple-900 bg-white",
|
||||
},
|
||||
publicDisplayCheckbox: {
|
||||
checkbox: "border border-purple-300 text-purple-500",
|
||||
description: "text-purple-500",
|
||||
container: "",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
}}
|
||||
allowDelete={true}
|
||||
id={eventTypeId}
|
||||
|
||||
Reference in new issue
Block a user