Skip to content

Commit

Permalink
feat(redmine 1275606): add review from Quentin
Browse files Browse the repository at this point in the history
  • Loading branch information
vapersmile committed Jan 26, 2024
1 parent 88fdbc3 commit a59cc59
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/react-front-kit/src/Components/CardList/CardList.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use client';

import type { CardSectionProps } from '@mantine/core';
import type { ScrollAreaProps } from '@mantine/core';
import type { ReactElement, ReactNode } from 'react';

import { CardSection, ScrollArea } from '@mantine/core';
Expand All @@ -11,7 +11,7 @@ interface IChildren {
props: { children: ReactNode[] };
}

export interface ICardListProps extends CardSectionProps {
export interface ICardListProps extends Omit<ScrollAreaProps, 'children'> {
children: IChildren;
height?: string;
separator?: boolean;
Expand All @@ -24,7 +24,7 @@ export function CardList(props: ICardListProps): ReactElement {
height,
separator = true,
spacing = '40px',
...cardSectionProps
...ScrollAreaProps
} = props;
const { classes } = useStyles({ separator, spacing });
children.props.children.map((item: ReactNode, index: number) => (
Expand All @@ -37,8 +37,9 @@ export function CardList(props: ICardListProps): ReactElement {
<ScrollArea
classNames={{ scrollbar: classes.scrollBar, thumb: classes.thumb }}
h={height}
{...ScrollAreaProps}
>
<CardSection className={classes.section} {...cardSectionProps}>
<CardSection className={classes.section}>
{children.props.children.map((item: ReactNode, index: number) => (
<div key={`${index + index}`} className={classes.item}>
{item}
Expand Down

0 comments on commit a59cc59

Please sign in to comment.