Spaces:
Sleeping
Sleeping
Download frontend/node_modules/@mui/system/esm/compose.js from sepidnes/pythonic-rag-FastAPIReact: direct link, hf CLI and curl.
- Browser
- Download file 752 Bytes
-
https://huggingface.co/spaces/sepidnes/pythonic-rag-FastAPIReact/resolve/56fda741e84da791ee2e6198479f1d5630989f6c/frontend/node_modules/%40mui/system/esm/compose.js
- Command line
-
hf download hf://spaces/sepidnes/pythonic-rag-FastAPIReact@56fda741e84da791ee2e6198479f1d5630989f6c/frontend/node_modules/@mui/system/esm/compose.js
-
curl -L -o compose.js https://huggingface.co/spaces/sepidnes/pythonic-rag-FastAPIReact/resolve/56fda741e84da791ee2e6198479f1d5630989f6c/frontend/node_modules/%40mui/system/esm/compose.js
752 Bytes
| import merge from './merge'; | |
| function compose(...styles) { | |
| const handlers = styles.reduce((acc, style) => { | |
| style.filterProps.forEach(prop => { | |
| acc[prop] = style; | |
| }); | |
| return acc; | |
| }, {}); | |
| // false positive | |
| // eslint-disable-next-line react/function-component-definition | |
| const fn = props => { | |
| return Object.keys(props).reduce((acc, prop) => { | |
| if (handlers[prop]) { | |
| return merge(acc, handlers[prop](props)); | |
| } | |
| return acc; | |
| }, {}); | |
| }; | |
| fn.propTypes = process.env.NODE_ENV !== 'production' ? styles.reduce((acc, style) => Object.assign(acc, style.propTypes), {}) : {}; | |
| fn.filterProps = styles.reduce((acc, style) => acc.concat(style.filterProps), []); | |
| return fn; | |
| } | |
| export default compose; |