Skip to content

Commit f0aa112

Browse files
Jardeljardel0x03
andauthored
fix(Component): leftIcon className has been overwritten in cell component (#726)
Co-authored-by: jardel <jardelcheung@gmail.com>
1 parent 089041b commit f0aa112

File tree

1 file changed

+1
-1
lines changed
  • packages/react-vant/src/components/cell

1 file changed

+1
-1
lines changed

packages/react-vant/src/components/cell/Cell.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const Cell: React.FC<CellProps> = props => {
5454
const renderLeftIcon = () => {
5555
if (props.icon) {
5656
return React.cloneElement(props.icon as React.ReactElement, {
57-
className: clsx(bem('left-icon')),
57+
className: clsx(props.icon?.props?.className ?? '', bem('left-icon')),
5858
})
5959
}
6060
return null

0 commit comments

Comments
 (0)