Skip to content

Commit

Permalink
Remove unordered list from Marquee & ensure we have no empty rows
Browse files Browse the repository at this point in the history
  • Loading branch information
hasparus committed Feb 4, 2025
1 parent bbdd9d4 commit 3aeedc0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
6 changes: 5 additions & 1 deletion packages/components/src/components/marquee/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,11 @@ export function MarqueeRows({
const chunks: ReactElement[][] = [];

for (let i = 0; i < rows; i++) {
chunks.push(children.slice(i * chunkSize, (i + 1) * chunkSize));
const chunk = children.slice(i * chunkSize, (i + 1) * chunkSize);

if (chunk.length !== 0) {
chunks.push(chunk);
}
}

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { hiveThemeDecorator } from '../../../../../.storybook/hive-theme-decorat
import { Marquee, MarqueeProps, MarqueeRows, MarqueeRowsProps } from './index';

export default {
title: 'Marquee',
title: 'Components/Marquee',
component: Marquee,
decorators: [hiveThemeDecorator],
parameters: {
Expand Down

0 comments on commit 3aeedc0

Please sign in to comment.