feat: create event type atom (#17142)

* feat: create event type atom

* fixup! feat: create event type atom

* fixup! fixup! feat: create event type atom

* docs: base doc for create event type atom
This commit is contained in:
Morgan
2024-10-17 21:51:23 +05:30
committed by GitHub
parent 8b50f419e5
commit 497b0804d3
15 changed files with 360 additions and 29 deletions
+36
View File
@@ -0,0 +1,36 @@
---
title: "Create EventType"
---
The create event-type atom enables you to display a form with the required input fields needed to create an event-type.
By specifying a team id as a prop of the component you can create an event-type for a specific team.
```js
import { CreateEventType } from "@calcom/atoms";
export default function EventType() {
return (
<>
<CreateEventType
onSuccess={(eventType) => {
console.log("EventType created", eventType);
}}
onError={(err) => {
console.log("Error while creating eventType", err);
}}
onCancel={() => {
console.log("Clicked on cancel button")
}}
customClassNames={{
atomsWrapper: "border p-4 shadow-md rounded-md",
buttons: { container: "justify-center", submit: "bg-red-500", cancel: "bg-gray-300" },
}}
/>
<>
)
}
```
<Info>
Please ensure all custom classnames are valid [Tailwind CSS](https://tailwindcss.com/) classnames.
</Info>