@apolitical/component-library 4.5.6 → 4.5.7-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,13 +1,28 @@
1
- import { type IDiscussionForm } from '../../discussion';
1
+ import React from 'react';
2
+ import { type IDiscussionForm, type CachedText, type IMentions } from '../../discussion';
2
3
  interface Props {
3
4
  /** Whether the modal is open on page load */
4
5
  showModal?: boolean;
5
- /** Function to call when the modal is closed */
6
- onClose?: () => void;
6
+ /** Functions used inside the modal */
7
+ functions: {
8
+ /** Function to call when the modal is closed */
9
+ onClose?: () => void;
10
+ /** Function to save the entered text */
11
+ cacheText?: React.Dispatch<React.SetStateAction<CachedText>>;
12
+ };
7
13
  /** Props for the DiscussionForm component */
8
14
  form: IDiscussionForm;
15
+ /** Saved text to pre-populate the form with */
16
+ cachedText?: {
17
+ /** The title text */
18
+ title?: string;
19
+ /** The body text */
20
+ body?: string;
21
+ /** The cached mention data */
22
+ mentions?: IMentions;
23
+ };
9
24
  /** Additional classes */
10
25
  className?: string;
11
26
  }
12
- declare const DiscussionFormModal: ({ showModal, onClose, form, className, }: Props) => import("react/jsx-runtime").JSX.Element;
27
+ declare const DiscussionFormModal: ({ showModal, functions: modalFunctions, form, cachedText, className, }: Props) => import("react/jsx-runtime").JSX.Element;
13
28
  export default DiscussionFormModal;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apolitical/component-library",
3
- "version": "4.5.6",
3
+ "version": "4.5.7-beta.1",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {