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:
@@ -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>
|
||||
Reference in New Issue
Block a user