@bonprix-ds/react-list 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.
- package/dist/index.d.ts +38 -0
- package/dist/index.js +2915 -0
- package/dist/index.js.map +1 -0
- package/package.json +49 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { FC } from 'react';
|
|
2
|
+
import { IconType } from '@bonprix-ds/react-icon';
|
|
3
|
+
import { ReactNode } from 'react';
|
|
4
|
+
|
|
5
|
+
declare const List: FC<ListProps> & Subcomponents;
|
|
6
|
+
export default List;
|
|
7
|
+
|
|
8
|
+
declare const ListItem: FC<Props>;
|
|
9
|
+
|
|
10
|
+
export declare interface ListProps {
|
|
11
|
+
/** The content of the list. Here, List.Item should be used. */
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
/** Defines the type of the list. The type can only be set for the whole list, not for individual items. */
|
|
14
|
+
type?: "text" | "button" | "link";
|
|
15
|
+
/** If set to `true`, the list items will show an arrow in the end. */
|
|
16
|
+
showArrows?: boolean;
|
|
17
|
+
/** Additional classes for further customization. */
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
declare interface Props {
|
|
22
|
+
/** The text content of the list item. */
|
|
23
|
+
children: string;
|
|
24
|
+
/** The icon to display in front of the list item. */
|
|
25
|
+
icon?: IconType;
|
|
26
|
+
/** Callback function to be called when the list item is clicked. */
|
|
27
|
+
onClick?: () => void;
|
|
28
|
+
/** If the `type` property of the List is set to `link`, this property is used to set the `href` attribute. */
|
|
29
|
+
href?: string;
|
|
30
|
+
/** If the `type` property of the List is set to `link`, this property is used to set the `target` attribute. */
|
|
31
|
+
target?: "_blank" | "_self" | "_parent" | "_top";
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
declare interface Subcomponents {
|
|
35
|
+
Item: typeof ListItem;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export { }
|