@apolitical/component-library 7.0.0 → 7.0.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 +1 @@
1
- export { default as Modal } from './modal';
1
+ export { type IModalProps, default as Modal } from './modal';
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- interface Props {
2
+ export interface IModalProps {
3
3
  /** The element that will render around the content */
4
4
  element?: 'section' | 'div' | 'ul';
5
5
  /** The content to display */
@@ -12,8 +12,11 @@ interface Props {
12
12
  hidden?: boolean | string;
13
13
  /** Optional styling */
14
14
  style?: React.CSSProperties;
15
+ /** Optional variant */
16
+ variant?: 'success' | 'error';
17
+ additionalContent?: React.ReactNode | JSX.Element | string;
15
18
  }
16
- declare const Modal: ({ element, children, className, ...props }: Props) => React.DOMElement<{
19
+ declare const Modal: ({ element, children, className, variant, additionalContent, ...props }: IModalProps) => React.DOMElement<{
17
20
  /** The ID of the element */
18
21
  id?: string | undefined;
19
22
  /** If the element should be hidden */
@@ -55,6 +55,8 @@ interface Props {
55
55
  };
56
56
  /** Props for the replies button */
57
57
  replies: false | {
58
+ /** Whether the user can reply */
59
+ canReply?: boolean;
58
60
  functions: {
59
61
  /** The function to handle the reply click */
60
62
  onClick: () => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@apolitical/component-library",
3
- "version": "7.0.0",
3
+ "version": "7.0.1",
4
4
  "main": "./index.js",
5
5
  "types": "./index.d.ts",
6
6
  "exports": {