Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/skeleton/skeleton.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Skeleton extends React.Component<SkeletonPropsT> {
<Row
$animation={this.props.animation}
key={index}
$isLastRow={index === this.props.rows - 1}
$isLastRow={index === (typeof this.props.rows !== 'undefined' ? this.props.rows : 0) - 1}
{...rowProps}
></Row>
))}
Expand Down
2 changes: 1 addition & 1 deletion src/skeleton/types.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export type OverridesT = {
export type SkeletonPropsT = {
overrides?: OverridesT,
/** Defines the number of row element in a skeleton */
rows: number,
rows?: number,
/** Defines if the skeleton has an animation default is false*/
animation: boolean,
/** Defines the height of the skeleton container*/
Expand Down
2 changes: 1 addition & 1 deletion src/skeleton/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export type SkeletonOverrides = {
export type SkeletonProps = {
overrides?: SkeletonOverrides;
/** Defines the number of row element in a skeleton */
rows: number;
rows?: number;
/** Defines if the skeleton has an animation default is false*/
animation: boolean;
/** Defines the height of the skeleton container*/
Expand Down