-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from dburles/esm-compat
ESM
- Loading branch information
Showing
41 changed files
with
204 additions
and
253 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,16 @@ | ||
import { Global as EmotionGlobal } from "@emotion/react"; | ||
import PropTypes from "prop-types"; | ||
import React from "react"; | ||
import css from "./private/css.mjs"; | ||
import useMystical from "./useMystical.mjs"; | ||
|
||
function Global({ styles }) { | ||
const context = useMystical(); | ||
return React.createElement(EmotionGlobal, { styles: css(styles)(context) }); | ||
} | ||
|
||
Global.propTypes = { | ||
styles: PropTypes.oneOfType([PropTypes.object, PropTypes.array]).isRequired, | ||
}; | ||
|
||
export default Global; |
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
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,6 @@ | ||
import { jsx as emotionJsx } from "@emotion/react"; | ||
import wrapCreateElement from "./private/wrapCreateElement.mjs"; | ||
|
||
const createElement = wrapCreateElement(emotionJsx); | ||
|
||
export default createElement; |
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 |
---|---|---|
@@ -1,5 +1,3 @@ | ||
"use strict"; | ||
|
||
const darkColorMode = "__MYSTICAL_INTERNAL_DARK_MODE__"; | ||
|
||
module.exports = darkColorMode; | ||
export default darkColorMode; |
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 was deleted.
Oops, something went wrong.
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,6 @@ | ||
import { jsxDEV as emotionJsxDev } from "@emotion/react/jsx-dev-runtime"; | ||
import wrapCreateElement from "./private/wrapCreateElement.mjs"; | ||
|
||
const jsxDEV = wrapCreateElement(emotionJsxDev); | ||
|
||
export { jsxDEV }; |
This file was deleted.
Oops, something went wrong.
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,11 @@ | ||
import { | ||
jsx as emotionJsx, | ||
jsxs as emotionJsxs, | ||
} from "@emotion/react/jsx-runtime"; | ||
import wrapCreateElement from "./private/wrapCreateElement.mjs"; | ||
|
||
const jsx = wrapCreateElement(emotionJsx); | ||
const jsxs = wrapCreateElement(emotionJsxs); | ||
|
||
// https://github.com/facebook/react/blob/master/packages/react/src/jsx/ReactJSX.js#L16-L19 | ||
export { jsx, jsxs }; |
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
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
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
Oops, something went wrong.