-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: bare bones poc layout demo on page FUI-1814
- Loading branch information
1 parent
daf44ec
commit e3278ce
Showing
2 changed files
with
51 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
import React from "react"; | ||
|
||
function loadFuiFallback() { | ||
return import( | ||
/* webpackMode: "lazy" */ | ||
"@genesislcap/foundation-ui" | ||
); | ||
} | ||
|
||
function loadFoundationLayoutFallback() { | ||
return import( | ||
/* webpackMode: "lazy" */ | ||
"@genesislcap/foundation-layout" | ||
); | ||
} | ||
|
||
async function loadRemotes(options) { | ||
const { registerFoundationDesignSystem } = await loadFuiFallback(); | ||
|
||
const { foundationLayoutComponents } = await loadFoundationLayoutFallback(); | ||
|
||
return { | ||
FoundationDesignSystem: registerFoundationDesignSystem().register( | ||
foundationLayoutComponents, | ||
), | ||
}; | ||
} | ||
|
||
loadRemotes({}); | ||
|
||
/** | ||
* Ensure tree shaking doesn't remove these | ||
* Perhaps we keep these MFs style free, ie. they need to get wrapped to have style applied. Keeping it simple for now. | ||
*/ | ||
export { LoadRemotesOptions, loadRemotes }; | ||
|
||
export default function Highlight({ children, color }) { | ||
return ( | ||
<div style={{ width: "500px", height: "500px" }}> | ||
<foundation-layout> | ||
<foundation-layout-item title="test"> | ||
<p>Test Item</p> | ||
</foundation-layout-item> | ||
</foundation-layout> | ||
</div> | ||
); | ||
} |