@bonprix-ds/react-collapsible 1.0.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,35 @@
1
+ import { FC } from 'react';
2
+ import { ReactNode } from 'react';
3
+ import { Ref } from 'react';
4
+ import { RefObject } from 'react';
5
+
6
+ declare const Collapsible: FC<CollapsibleProps>;
7
+ export default Collapsible;
8
+
9
+ export declare interface CollapsibleImperativeHandle {
10
+ open: () => void;
11
+ close: () => void;
12
+ }
13
+
14
+ export declare interface CollapsibleProps {
15
+ /** Brief summary or label for the content within the component. */
16
+ title: ReactNode;
17
+ /** Content of the collapsible, which might be collapsed or expanded. */
18
+ children: ReactNode;
19
+ /** If `true`, the collapsible content will be initially opened. */
20
+ initiallyOpened?: boolean;
21
+ /** A reference to the root element. */
22
+ rootRef?: RefObject<HTMLDivElement | null>;
23
+ /** A reference to the imperative handle of the component. */
24
+ imperativeRef?: Ref<CollapsibleImperativeHandle>;
25
+ /** The id of the collapsible component. */
26
+ id?: string;
27
+ /** Callback function that is called when the collapsible component is opened. */
28
+ onOpen?: () => void;
29
+ /** Callback function that is called when the collapsible component is closed. */
30
+ onClose?: () => void;
31
+ /** Callback function that is called when the collapsible component is initially in view. */
32
+ onInitialInView?: () => void;
33
+ }
34
+
35
+ export { }