diff --git a/package.json b/package.json index d9ba965f..1683e427 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ "tsc": "tsc --noEmit" }, "dependencies": { - "@rc-component/util": "^1.11.1", + "@rc-component/util": "^1.13.0", "clsx": "^2.1.1" }, "devDependencies": { diff --git a/src/Pagination.tsx b/src/Pagination.tsx index ac1c4b26..2ca06bd8 100644 --- a/src/Pagination.tsx +++ b/src/Pagination.tsx @@ -1,5 +1,6 @@ import { clsx } from 'clsx'; import { + isReactRenderable, KeyCode, pickAttrs, useControlledState, @@ -120,7 +121,9 @@ const Pagination: React.FC = (props) => { _label: string, title?: string, ) { - let iconNode = icon || ( + let iconNode = isReactRenderable(icon) ? ( + icon + ) : (