neue Homepage auf react basis

This commit is contained in:
2026-08-07 21:39:30 +02:00
parent 164bdd19ad
commit ee89442c04
52191 changed files with 1230242 additions and 58 deletions
+22
View File
@@ -0,0 +1,22 @@
import fastDeepAssign from '@mui/utils/fastDeepAssign';
function compose(...styles) {
const handlers = styles.reduce((acc, style) => {
style.filterProps.forEach(prop => {
acc[prop] = style;
});
return acc;
}, {});
const fn = props => {
const result = {};
for (const prop in props) {
if (handlers[prop]) {
fastDeepAssign(result, handlers[prop](props));
}
}
return result;
};
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;