# rn-log-activity-form URL: /docs/native/docyrus/log-activity-form Presentational multi-surface activity composer with Comment, Email, Call, Meeting, Task and Status tabs, each reporting its own typed submit callback. ## Installation ```bash pnpm dlx @docyrus/cli add @docyrus/rn-log-activity-form ``` **Dependencies:** - [react-native-reanimated](https://www.npmjs.com/package/react-native-reanimated) - [@shopify/flash-list](https://www.npmjs.com/package/@shopify/flash-list) A scrollable tab bar switches between six surfaces rendered inline: | Tab | Surface | Callback | |-----|---------|----------| | Comment | `CommentsPanel` (mentions, replies, delete) | `onCreateComment`, `onDeleteComment` | | Email | Native [rn-email-composer](/docs/native/docyrus/email-composer), or the `renderEmailComposer` slot | `onSendEmail` | | Call / Meeting | Subject, type, start, end, owner, description | `onSubmitEvent(input, 'call' \| 'meeting')` | | Task | Subject (required), status, priority, assignee, due date, description | `onSubmitTask` | | Status | Inline `DocyFieldStatus` with sub-status, notes and follow-up date | `onSubmitStatus` | The form owns no network I/O. Spread `useDocyrusLogActivity(...).logActivityProps` to connect it to Docyrus, or pass your own data and callbacks. Every submit shows a success or error toast through the native `toast` (mount a ``). A rejected callback keeps the draft so the user can retry. ## Usage ```tsx import { LogActivityForm } from '@/components/docyrus-native/log-activity-form'; import { useDocyrusLogActivity } from '@/hooks/docyrus-native/use-docyrus-log-activity'; function LogActivity({ client, recordId }) { const { logActivityProps } = useDocyrusLogActivity({ client, appSlug: 'base', dataSourceSlug: 'contact', recordId, relationSlug: 'contact', callEventTypeName: 'Call', meetingEventTypeName: 'Meeting' }); return ; } ``` ### Without the hook ```tsx