fix: event types atom docs (#17528)

* fix syntax for code examples

* fixup
This commit is contained in:
Rajiv Sahal
2024-11-07 07:59:29 +00:00
committed by GitHub
parent 54cc2dc094
commit e101f35b4f
2 changed files with 41 additions and 41 deletions
+33 -33
View File
@@ -14,16 +14,16 @@ import { CreateEventType } from "@calcom/atoms";
export default function EventType() {
return (
<>
<CreateEventType
onSuccess={(eventType) => {
console.log("EventType created successfully", eventType);
}}
customClassNames={{
atomsWrapper: "border p-4 rounded-md",
buttons: { submit: "bg-red-500", cancel: "bg-gray-300" },
}}
/>
<>
<CreateEventType
onSuccess={(eventType) => {
console.log("EventType created successfully", eventType);
}}
customClassNames={{
atomsWrapper: "border p-4 rounded-md",
buttons: { submit: "bg-red-500", cancel: "bg-gray-300" },
}}
/>
</>
)
}
```
@@ -52,20 +52,20 @@ Below code snippet can be used to render the create event type atom for a team.
```js
import { CreateEventType } from "@calcom/atoms";
export default function TeamEventType(teamId: number) {
export default function TeamEventType(teamId: number) {l
return (
<>
<CreateEventType
teamId={teamId}
onSuccess={(eventType) => {
console.log("EventType created successfully", eventType);
}}
customClassNames={{
atomsWrapper: "border p-4 rounded-md",
buttons: { submit: "bg-red-500", cancel: "bg-gray-300" },
}}
/>
<>
<CreateEventType
teamId={teamId}
onSuccess={(eventType) => {
console.log("EventType created successfully", eventType);
}}
customClassNames={{
atomsWrapper: "border p-4 rounded-md",
buttons: { submit: "bg-red-500", cancel: "bg-gray-300" },
}}
/>
</>
)
}
```
@@ -114,19 +114,19 @@ Below code snippet can be used to render the event type settings atom.
```js
import { EventTypeSettings } from "@calcom/atoms";
export default function EventTypeSettings(eventTypeId: number) {
export function EventTypeTabs(eventTypeId: number) {
return (
<>
<EventTypeSettings
id={eventTypeId}
allowDelete={true}
onSuccess={(eventType) => {
console.log("EventType settings updated successfully", eventType);
}}
customClassNames={{ atomsWrapper: "!w-[70vw] !m-auto" }}
/>
<>
)
<EventTypeSettings
id={eventTypeId}
allowDelete={true}
onSuccess={(eventType) => {
console.log("EventType settings updated successfully", eventType);
}}
customClassNames={{ atomsWrapper: "!w-[70vw] !m-auto" }}
/>
</>
);
}
```
+8 -8
View File
@@ -11,9 +11,9 @@ import { PaymentForm } from "@calcom/atoms";
export default function StripePaymentForm(uid: string) {
return (
<main>
<>
<PaymentForm paymentUid={uid} />
</main>
</>
);
}
```
@@ -60,9 +60,9 @@ import { EventTypeSettings } from "@calcom/atoms";
export default function EventType(id: number) {
return (
<main>
<EventTypeSettings id={id} tabs={["setup", "availability", "payments"]} />
</main>
<>
<EventTypeSettings id={id} allowDelete={true} />
</>
);
}
```
@@ -92,7 +92,7 @@ export default function Booker( props : BookerProps ) {
}
}}
/>
<>
</>
)
}
```
@@ -112,9 +112,9 @@ export default function StripePaymentForm() {
const uid = pathname.split("/").pop();
return (
<main>
<>
<PaymentForm paymentUid={uid} />
</main>
</>
);
}
```