ant-design/components/cascader/hooks/useCheckable.tsx
二货爱吃白萝卜 7e692ad585
feat: Cascader.Panel support (#45089)
* chore: init

* chore: panel style

* docs: update demo

* chore: fill style

* test: update snapshot

* docs: update demo

* chore: push

* docs: update desc

* chore: fix icons

* chore: use shared hooks

* test: update snapshot

* chore: fix lint
2023-09-26 17:34:49 +08:00

9 lines
257 B
TypeScript

import * as React from 'react';
export default function useCheckable(cascaderPrefixCls: string, multiple?: boolean) {
return React.useMemo(
() => (multiple ? <span className={`${cascaderPrefixCls}-checkbox-inner`} /> : false),
[multiple],
);
}