admin panel fast follows (#10723)
fast follows: - https://discord.com/channels/1130383047699738754/1346433965451382845 - https://discord.com/channels/1130383047699738754/1346434512757981264 - https://discord.com/channels/1130383047699738754/1346453484911853610 --------- Co-authored-by: Félix Malfait <felix.malfait@gmail.com>
This commit is contained in:
@ -42,10 +42,12 @@ type SettingsListCardProps<ListItem extends { id: string }> = {
|
||||
onRowClick?: (item: ListItem) => void;
|
||||
RowIcon?: IconComponent;
|
||||
RowIconFn?: (item: ListItem) => IconComponent;
|
||||
RowIconColor?: string;
|
||||
RowRightComponent: ComponentType<{ item: ListItem }>;
|
||||
footerButtonLabel?: string;
|
||||
onFooterButtonClick?: () => void;
|
||||
to?: (item: ListItem) => string;
|
||||
rounded?: boolean;
|
||||
};
|
||||
|
||||
export const SettingsListCard = <
|
||||
@ -61,21 +63,24 @@ export const SettingsListCard = <
|
||||
onRowClick,
|
||||
RowIcon,
|
||||
RowIconFn,
|
||||
RowIconColor,
|
||||
RowRightComponent,
|
||||
onFooterButtonClick,
|
||||
footerButtonLabel,
|
||||
to,
|
||||
rounded,
|
||||
}: SettingsListCardProps<ListItem>) => {
|
||||
const theme = useTheme();
|
||||
|
||||
if (isLoading === true) return <SettingsListSkeletonCard />;
|
||||
|
||||
return (
|
||||
<Card>
|
||||
<Card rounded={rounded}>
|
||||
{items.map((item, index) => (
|
||||
<SettingsListItemCardContent
|
||||
key={item.id}
|
||||
LeftIcon={RowIconFn ? RowIconFn(item) : RowIcon}
|
||||
LeftIconColor={RowIconColor}
|
||||
label={getItemLabel(item)}
|
||||
description={getItemDescription?.(item)}
|
||||
rightComponent={<RowRightComponent item={item} />}
|
||||
|
||||
Reference in New Issue
Block a user