Skip to content

Commit

Permalink
🐛 fix: fix SpotlightCard render
Browse files Browse the repository at this point in the history
  • Loading branch information
arvinxx committed Dec 3, 2023
1 parent 660bb22 commit ec89866
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/SpotlightCard/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export interface SpotlightCardProps<T = any> extends DivProps {
const SpotlightCard = memo<SpotlightCardProps>(
({
items,
renderItem,
renderItem: Content,
className,
columns = 3,
gap = 12,
Expand Down Expand Up @@ -65,15 +65,14 @@ const SpotlightCard = memo<SpotlightCardProps>(
{...rest}
>
{items.map((item, index) => {
const children = renderItem(item);
return (
<SpotlightCardItem
borderRadius={borderRadius}
className={CHILDREN_CLASSNAME}
key={index}
size={size}
>
{children}
<Content {...item} />
</SpotlightCardItem>
);
})}
Expand Down

0 comments on commit ec89866

Please sign in to comment.