mirror of
https://github.com/ant-design/ant-design.git
synced 2024-12-15 17:19:11 +08:00
15 lines
316 B
TypeScript
15 lines
316 B
TypeScript
|
import { useMemo } from 'react';
|
||
|
import type { Components } from 'rc-picker/lib/interface';
|
||
|
|
||
|
import PickerButton from '../PickerButton';
|
||
|
|
||
|
export default function useComponents(components?: Components) {
|
||
|
return useMemo(
|
||
|
() => ({
|
||
|
button: PickerButton,
|
||
|
...components,
|
||
|
}),
|
||
|
[components],
|
||
|
);
|
||
|
}
|