diff --git a/package.json b/package.json index 7ab94d8..1133e0d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@internxt/ui", - "version": "0.1.2", + "version": "0.1.3", "description": "Library of Internxt components", "repository": { "type": "git", diff --git a/src/components/list/List.tsx b/src/components/list/List.tsx index f6fa515..56f70e6 100644 --- a/src/components/list/List.tsx +++ b/src/components/list/List.tsx @@ -33,6 +33,7 @@ export interface ListProps { disableItemCompositionStyles?: boolean; onMouseEnter?: () => void; onMouseLeave?: () => void; + headerBackgroundColor?: string; keyBoardShortcutActions?: { onShiftFKeysPressed?: () => void; onRKeyPressed?: () => void; @@ -118,6 +119,9 @@ export interface ListProps { * @property {() => void} [onMouseLeave] * - Optional callback triggered when the mouse leaves the list. * + * @property {string} [headerBackgroundColor] + * - Optional background color for the header. + * * @property { * { onShiftFKeysPressed?: () => void; onRKeyPressed?: () => void; onBackspaceKeyPressed?: () => void } * } [keyBoardShortcutActions] @@ -151,6 +155,7 @@ const List = ({ disableItemCompositionStyles, onMouseEnter, onMouseLeave, + headerBackgroundColor = 'bg-surface', keyBoardShortcutActions, disableKeyboardShortcuts, }: ListProps): JSX.Element => { @@ -298,21 +303,23 @@ const List = ({ > {/* BODY */}
- {!isEmptyState ? ( - - ) : null} +
+ {!isEmptyState ? ( + + ) : null} +
{isEmptyState ? ( emptyState ) : items.length > 0 && !forceLoading ? ( diff --git a/src/components/list/__test__/__snapshots__/List.test.tsx.snap b/src/components/list/__test__/__snapshots__/List.test.tsx.snap index e37c6ba..96d46b1 100644 --- a/src/components/list/__test__/__snapshots__/List.test.tsx.snap +++ b/src/components/list/__test__/__snapshots__/List.test.tsx.snap @@ -14,69 +14,73 @@ exports[`List component > should match snapshot 1`] = ` id="scrollableList" >
- -
-
+ + +
+ - + -
+ + Age + + +
+
@@ -208,69 +212,73 @@ exports[`List component > should match snapshot 1`] = ` id="scrollableList" >
- -
-
+ + +
+ - + -
+ + Age + + +
+