Skip to content

Commit

Permalink
fix(Component): leftIcon className has been overwritten in cell compo…
Browse files Browse the repository at this point in the history
…nent (#726)

Co-authored-by: jardel <[email protected]>
  • Loading branch information
JardelCheung and JardelCheung committed Jun 6, 2024
1 parent 089041b commit f0aa112
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/react-vant/src/components/cell/Cell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const Cell: React.FC<CellProps> = props => {
const renderLeftIcon = () => {
if (props.icon) {
return React.cloneElement(props.icon as React.ReactElement, {
className: clsx(bem('left-icon')),
className: clsx(props.icon?.props?.className ?? '', bem('left-icon')),
})
}
return null
Expand Down

0 comments on commit f0aa112

Please sign in to comment.