Documents / @faasjs/ant-design / useThemeToken
Function: useThemeToken()
useThemeToken():
GlobalToken
Read the current Ant Design theme token.
Returns
GlobalToken
Ant Design global token object for the active theme.
Example
import { useThemeToken } from '@faasjs/ant-design'
function PrimarySwatch() {
const { colorPrimary } = useThemeToken()
return <div style={{ width: 24, height: 24, background: colorPrimary }} />
}