@livechat/design-system-react-components 2.27.2 → 2.28.0

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.
@@ -0,0 +1,3 @@
1
+ import { ISystemMessageProps } from './types';
2
+ import * as React from 'react';
3
+ export declare const SystemMessage: React.FC<React.PropsWithChildren<ISystemMessageProps>>;
@@ -0,0 +1,8 @@
1
+ import { FC } from 'react';
2
+
3
+ interface ISystemMessageTimestampProps {
4
+ timestamp: string;
5
+ timestampWithSeconds: string;
6
+ }
7
+ export declare const SystemMessageTimestamp: FC<ISystemMessageTimestampProps>;
8
+ export {};
@@ -0,0 +1,2 @@
1
+ export { SystemMessage } from './SystemMessage';
2
+ export type { ISystemMessageProps, SystemMessageKind, SystemMessageAction, } from './types';
@@ -0,0 +1,52 @@
1
+ import { ComponentCoreProps } from '../../utils/types';
2
+ import { IconSource } from '../Icon';
3
+ import * as React from 'react';
4
+ export type SystemMessageKind = 'info' | 'positive' | 'warning' | 'error' | 'default';
5
+ export type SystemMessageAction = {
6
+ label: string;
7
+ callback: () => void;
8
+ icon?: IconSource;
9
+ };
10
+ export interface ISystemMessageProps extends ComponentCoreProps {
11
+ /**
12
+ * Children to display in the system message - will be displayed as title
13
+ * If your title is 60 characters or more, please use a description line.
14
+ */
15
+ children: React.ReactNode;
16
+ /**
17
+ * Alignment of the system message
18
+ */
19
+ alignment?: 'left' | 'right';
20
+ /**
21
+ * Kind of the system message
22
+ */
23
+ kind?: SystemMessageKind;
24
+ /**
25
+ * Icon to display in the system message
26
+ */
27
+ iconSource?: IconSource;
28
+ /**
29
+ * Whether the title should be bold
30
+ */
31
+ titleBold?: boolean;
32
+ /**
33
+ * Source of the message
34
+ */
35
+ source?: string;
36
+ /**
37
+ * Details text for the system message
38
+ */
39
+ details?: string[];
40
+ /**
41
+ * Timestamp for the system message
42
+ */
43
+ timestamp?: string;
44
+ /**
45
+ * Timestamp with seconds for the system message
46
+ */
47
+ timestampWithSeconds?: string;
48
+ /**
49
+ * Actions to display in the system message
50
+ */
51
+ actions?: SystemMessageAction[];
52
+ }