Skip to content

Commit 003d065

Browse files
achu19LijuChu
andauthored
fix(components): fix genStyleHook method for csp (#48)
change genStyleHook method to fix the CSP setting missing issue Co-authored-by: liju_chu <Liju_Chu@asus.com>
1 parent a52f786 commit 003d065

File tree

1 file changed

+2
-1
lines changed
  • packages/components/src/__builtins__

1 file changed

+2
-1
lines changed

packages/components/src/__builtins__/style.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,12 @@ export const genStyleHook = <ComponentName extends OverrideComponent>(
7171
) => {
7272
return (prefixCls: string): UseComponentStyleResult => {
7373
const { theme, token, hashId } = useToken()
74-
const { getPrefixCls, iconPrefixCls } = useConfig()
74+
const { getPrefixCls, iconPrefixCls, csp } = useConfig()
7575
const rootPrefixCls = getPrefixCls()
7676
return [
7777
useStyleRegister(
7878
{
79+
nonce: csp?.nonce,
7980
theme,
8081
token,
8182
hashId,

0 commit comments

Comments
 (0)