Hiyve Components - v1.0.0
    Preparing search index...
    • ScheduleForm provides a complete form for creating and editing meetings

      For integration with @hiyve/react-intelligence, use the useScheduling() hook and handle submission via the onSubmit callback.

      Parameters

      Returns Element

      import { CloudProvider, useScheduling } from '@hiyve/react-intelligence';
      import { ScheduleForm } from '@hiyve/react-intelligence';

      function ScheduleDialog({ onClose }) {
      const { create, loading } = useScheduling();

      return (
      <ScheduleForm
      loading={loading}
      onSubmit={async (values) => {
      const meeting = await create(values);
      if (meeting) {
      onClose();
      }
      }}
      onCancel={onClose}
      />
      );
      }
      const { update, loading } = useScheduling();

      <ScheduleForm
      meeting={existingMeeting}
      loading={loading}
      onSubmit={async (values) => {
      await update(existingMeeting.id, values);
      }}
      />
      <ScheduleForm
      onSubmit={async (values) => {
      await myApi.createMeeting(values);
      }}
      showRecurrence={false}
      />