From 318707b9905ff732b6031d8847ae9d75b3dfc975 Mon Sep 17 00:00:00 2001 From: mbrucedogs Date: Mon, 21 Jul 2025 09:55:53 -0500 Subject: [PATCH] Signed-off-by: mbrucedogs --- src/components/common/ListItem.tsx | 73 +++++++++++++----------------- 1 file changed, 31 insertions(+), 42 deletions(-) diff --git a/src/components/common/ListItem.tsx b/src/components/common/ListItem.tsx index 2be67ce..16eaf01 100644 --- a/src/components/common/ListItem.tsx +++ b/src/components/common/ListItem.tsx @@ -2,6 +2,7 @@ import React, { forwardRef, useMemo } from 'react'; import { IonItem, IonLabel, IonIcon } from '@ionic/react'; import { chevronForward } from 'ionicons/icons'; import type { Song } from '../../types'; +import { NumberDisplay } from './NumberDisplay'; // Generic ListItem interface for different types of data interface GenericListItemProps { @@ -18,6 +19,7 @@ interface GenericListItemProps { button?: boolean; style?: React.CSSProperties; endContent?: React.ReactNode; + showSeparator?: boolean; } // Song-specific ListItem interface @@ -55,59 +57,46 @@ export const ListItem = React.memo(forwardRef { return ( - -
- {showNumber && number !== undefined && ( - -
- {number} -
-
- )} - -
- {primaryText} + {/* Number (if enabled) */} + {showNumber && number !== undefined && ( + + )} + {/* Main content */} + +
+ {primaryText} +
+ {secondaryText && ( +
+ {secondaryText}
- {secondaryText && ( -
- {secondaryText} -
- )} -
-
{children}
-
{endContent}
-
+ )} +
+ {/* End content */} + {children &&
{children}
} + {endContent &&
{endContent}
} {showChevron && ( - )}