mirror of
https://github.com/idanoo/GoScrobble.git
synced 2024-11-25 09:55:15 +00:00
1 line
2.1 KiB
JSON
1 line
2.1 KiB
JSON
|
{"ast":null,"code":"/* eslint-disable no-restricted-syntax */\nexport default function getThemeProps(params) {\n var theme = params.theme,\n name = params.name,\n props = params.props;\n\n if (!theme || !theme.props || !theme.props[name]) {\n return props;\n } // Resolve default props, code borrow from React source.\n // https://github.com/facebook/react/blob/15a8f031838a553e41c0b66eb1bcf1da8448104d/packages/react/src/ReactElement.js#L221\n\n\n var defaultProps = theme.props[name];\n var propName;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n\n return props;\n}","map":{"version":3,"sources":["/app/node_modules/@material-ui/styles/esm/getThemeProps/getThemeProps.js"],"names":["getThemeProps","params","theme","name","props","defaultProps","propName","undefined"],"mappings":"AAAA;AACA,eAAe,SAASA,aAAT,CAAuBC,MAAvB,EAA+B;AAC5C,MAAIC,KAAK,GAAGD,MAAM,CAACC,KAAnB;AAAA,MACIC,IAAI,GAAGF,MAAM,CAACE,IADlB;AAAA,MAEIC,KAAK,GAAGH,MAAM,CAACG,KAFnB;;AAIA,MAAI,CAACF,KAAD,IAAU,CAACA,KAAK,CAACE,KAAjB,IAA0B,CAACF,KAAK,CAACE,KAAN,CAAYD,IAAZ,CAA/B,EAAkD;AAChD,WAAOC,KAAP;AACD,GAP2C,CAO1C;AACF;;;AAGA,MAAIC,YAAY,GAAGH,KAAK,CAACE,KAAN,CAAYD,IAAZ,CAAnB;AACA,MAAIG,QAAJ;;AAEA,OAAKA,QAAL,IAAiBD,YAAjB,EAA+B;AAC7B,QAAID,KAAK,CAACE,QAAD,CAAL,KAAoBC,SAAxB,EAAmC;AACjCH,MAAAA,KAAK,CAACE,QAAD,CAAL,GAAkBD,YAAY,CAACC,QAAD,CAA9B;AACD;AACF;;AAED,SAAOF,KAAP;AACD","sourcesContent":["/* eslint-disable no-restricted-syntax */\nexport default function getThemeProps(params) {\n var theme = params.theme,\n name = params.name,\n props = params.props;\n\n if (!theme || !theme.props || !theme.props[name]) {\n return props;\n } // Resolve default props, code borrow from React source.\n // https://github.com/facebook/react/blob/15a8f031838a553e41c0b66eb1bcf1da8448104d/packages/react/src/ReactElement.js#L221\n\n\n var defaultProps = theme.props[name];\n var propName;\n\n for (propName in defaultProps) {\n if (props[propName] === undefined) {\n props[propName] = defaultProps[propName];\n }\n }\n\n return props;\n}"]},"metadata":{},"sourceType":"module"}
|