Skip to content

Commit

Permalink
fix(Area): fixed a bug where className was not assigned to areaDot (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
108yen committed Mar 15, 2024
1 parent 9215b75 commit d44f25e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/cartesian/Area.tsx
Expand Up @@ -255,7 +255,8 @@ export class Area extends PureComponent<Props, State> {
} else if (isFunction(option)) {
dotItem = option(props);
} else {
dotItem = <Dot {...props} className="recharts-area-dot" />;
const className = clsx('recharts-area-dot', typeof option !== 'boolean' ? option.className : '');
dotItem = <Dot {...props} className={className} />;
}

return dotItem;
Expand Down
2 changes: 1 addition & 1 deletion src/cartesian/Line.tsx
Expand Up @@ -333,7 +333,7 @@ export class Line extends PureComponent<Props, State> {
} else if (isFunction(option)) {
dotItem = option(props);
} else {
const className = clsx('recharts-line-dot', option ? (option as DotProps).className : '');
const className = clsx('recharts-line-dot', typeof option !== 'boolean' ? option.className : '');
dotItem = <Dot {...props} className={className} />;
}

Expand Down

0 comments on commit d44f25e

Please sign in to comment.