ant-design/components/config-provider/hooks/useCSSVarCls.ts
MadCcc 452bdcdb53
refactor: select support css var (#45727)
* refactor: select support css var

* chore: code clean

* chore: add useCSSVarCls

* chore: update style

* chore: perf code
2023-11-09 09:35:45 +08:00

10 lines
216 B
TypeScript

import { useToken } from '../../theme/internal';
const useCSSVarCls = (prefixCls: string) => {
const [, , , , cssVar] = useToken();
return cssVar ? `${prefixCls}-css-var` : '';
};
export default useCSSVarCls;