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 && ( - )}