From 7cd6be5b43db47b6294e022f1d3937115af7649e Mon Sep 17 00:00:00 2001 From: ZeeshanTamboli Date: Wed, 10 Aug 2022 14:16:00 +0530 Subject: [PATCH] add some more allowed patterns to key --- docs/src/components/footer/EmailSubscribe.tsx | 4 ++-- .../mui-system/src/styleFunctionSx/styleFunctionSx.d.ts | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/src/components/footer/EmailSubscribe.tsx b/docs/src/components/footer/EmailSubscribe.tsx index 1f7d106296e8c2..44503af17abacf 100644 --- a/docs/src/components/footer/EmailSubscribe.tsx +++ b/docs/src/components/footer/EmailSubscribe.tsx @@ -137,12 +137,12 @@ export default function EmailSubscribe({ sx }: { sx?: SxProps }) { }, [`&.${inputBaseClasses.focused}`]: { - borderColor: (theme) => + borderColor: (theme: Theme) => theme.palette.mode === 'dark' ? theme.palette.primaryDark[300] : theme.palette.primary[500], outline: '3px solid', - outlineColor: (theme) => + outlineColor: (theme: Theme) => theme.palette.mode === 'dark' ? theme.palette.primaryDark[500] : theme.palette.primary[200], diff --git a/packages/mui-system/src/styleFunctionSx/styleFunctionSx.d.ts b/packages/mui-system/src/styleFunctionSx/styleFunctionSx.d.ts index 5ab2389193da52..b59c327d3668c9 100644 --- a/packages/mui-system/src/styleFunctionSx/styleFunctionSx.d.ts +++ b/packages/mui-system/src/styleFunctionSx/styleFunctionSx.d.ts @@ -26,7 +26,12 @@ export interface CSSSelectorObject { type CssVariableType = string | number; -type AllowedKeys = `--${string}` | `&${string}`; +type AllowedKeys = + | `--${string}` + | `&${string}` + | `${CSS.AtRules}${string}` + | `::${string}` + | `${number}%`; /** * Map all nested selectors and CSS variables.