Initial commit
This commit is contained in:
commit
78f8d225ee
21173 changed files with 2907774 additions and 0 deletions
16
node_modules/use-sidecar/dist/es2019/exports.js
generated
vendored
Normal file
16
node_modules/use-sidecar/dist/es2019/exports.js
generated
vendored
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
import * as React from 'react';
|
||||
const SideCar = ({ sideCar, ...rest }) => {
|
||||
if (!sideCar) {
|
||||
throw new Error('Sidecar: please provide `sideCar` property to import the right car');
|
||||
}
|
||||
const Target = sideCar.read();
|
||||
if (!Target) {
|
||||
throw new Error('Sidecar medium not found');
|
||||
}
|
||||
return React.createElement(Target, { ...rest });
|
||||
};
|
||||
SideCar.isSideCarExport = true;
|
||||
export function exportSidecar(medium, exported) {
|
||||
medium.useMedium(exported);
|
||||
return SideCar;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue