mirror of
https://github.com/xibyte/jsketcher
synced 2025-12-06 16:33:15 +01:00
11 lines
No EOL
291 B
JavaScript
11 lines
No EOL
291 B
JavaScript
import React from 'react';
|
|
import context from 'cad/context';
|
|
|
|
export default function mapContext(mapper) {
|
|
return function (Component) {
|
|
return function ContextMapper(props) {
|
|
const actions = mapper(context, props);
|
|
return <Component {...actions} {...props} />
|
|
}
|
|
}
|
|
} |