File size: 389 Bytes
1e92f2d
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { useToken } from '../../theme/internal';

/**
 * This hook is only for cssVar to add root className for components.
 * If root ClassName is needed, this hook could be refactored with `-root`
 * @param prefixCls
 */
const useCSSVarCls = (prefixCls: string) => {
  const [, , , , cssVar] = useToken();

  return cssVar ? `${prefixCls}-css-var` : '';
};

export default useCSSVarCls;