Skip to content

Commit

Permalink
use @mdx v3
Browse files Browse the repository at this point in the history
  • Loading branch information
chenxsan committed Jun 24, 2024
1 parent a5236d6 commit 83ee4f6
Show file tree
Hide file tree
Showing 3 changed files with 138 additions and 558 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"@babel/plugin-proposal-class-properties": "^7.17.12",
"@babel/preset-env": "^7.24.6",
"@babel/preset-react": "^7.24.6",
"@mdx-js/loader": "^2.0.0",
"@mdx-js/loader": "^3.0.1",
"@octokit/auth-action": "^5.1.1",
"@octokit/rest": "^20.1.1",
"@pmmmwh/react-refresh-webpack-plugin": "next",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ VFile {
"history": [],
"map": undefined,
"messages": [],
"value": "/*@jsxRuntime automatic @jsxImportSource react*/
import {jsx as _jsx, jsxs as _jsxs} from "react/jsx-runtime";
"value": "import {jsx as _jsx, jsxs as _jsxs} from "react/jsx-runtime";
function _createMdxContent(props) {
const _components = Object.assign({
p: "p"
}, props.components);
const _components = {
p: "p",
...props.components
};
return _jsx("div", {
align: "center",
children: _jsx("p", {
Expand All @@ -28,13 +28,15 @@ function _createMdxContent(props) {
})
});
}
function MDXContent(props = {}) {
export default function MDXContent(props = {}) {
const {wrapper: MDXLayout} = props.components || ({});
return MDXLayout ? _jsx(MDXLayout, Object.assign({}, props, {
children: _jsx(_createMdxContent, props)
})) : _createMdxContent(props);
return MDXLayout ? _jsx(MDXLayout, {
...props,
children: _jsx(_createMdxContent, {
...props
})
}) : _createMdxContent(props);
}
export default MDXContent;
",
}
`;
Expand All @@ -46,20 +48,21 @@ VFile {
"history": [],
"map": undefined,
"messages": [],
"value": "/*@jsxRuntime automatic @jsxImportSource react*/
import {jsx as _jsx} from "react/jsx-runtime";
"value": "import {jsx as _jsx} from "react/jsx-runtime";
function _createMdxContent(props) {
return _jsx("div", {
align: "center"
});
}
function MDXContent(props = {}) {
export default function MDXContent(props = {}) {
const {wrapper: MDXLayout} = props.components || ({});
return MDXLayout ? _jsx(MDXLayout, Object.assign({}, props, {
children: _jsx(_createMdxContent, props)
})) : _createMdxContent(props);
return MDXLayout ? _jsx(MDXLayout, {
...props,
children: _jsx(_createMdxContent, {
...props
})
}) : _createMdxContent(props);
}
export default MDXContent;
",
}
`;
Expand All @@ -71,20 +74,21 @@ VFile {
"history": [],
"map": undefined,
"messages": [],
"value": "/*@jsxRuntime automatic @jsxImportSource react*/
import {jsx as _jsx} from "react/jsx-runtime";
"value": "import {jsx as _jsx} from "react/jsx-runtime";
function _createMdxContent(props) {
return _jsx("div", {
align: "center"
});
}
function MDXContent(props = {}) {
export default function MDXContent(props = {}) {
const {wrapper: MDXLayout} = props.components || ({});
return MDXLayout ? _jsx(MDXLayout, Object.assign({}, props, {
children: _jsx(_createMdxContent, props)
})) : _createMdxContent(props);
return MDXLayout ? _jsx(MDXLayout, {
...props,
children: _jsx(_createMdxContent, {
...props
})
}) : _createMdxContent(props);
}
export default MDXContent;
",
}
`;
Loading

0 comments on commit 83ee4f6

Please sign in to comment.