@ttoss/components 1.29.18 → 1.29.19
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/esm/index.js +2 -0
- package/dist/index.js +2 -0
- package/package.json +3 -2
- package/src/components/Markdown.tsx +4 -1
package/dist/esm/index.js
CHANGED
|
@@ -214,6 +214,7 @@ var ToastContainer = props => {
|
|
|
214
214
|
// src/components/Markdown.tsx
|
|
215
215
|
import { BaseStyles } from "@ttoss/ui";
|
|
216
216
|
import ReactMarkdown from "react-markdown";
|
|
217
|
+
import remarkGfm from "remark-gfm";
|
|
217
218
|
import { jsx as jsx5 } from "react/jsx-runtime";
|
|
218
219
|
var Markdown = ({
|
|
219
220
|
children,
|
|
@@ -223,6 +224,7 @@ var Markdown = ({
|
|
|
223
224
|
return /* @__PURE__ */jsx5(BaseStyles, {
|
|
224
225
|
sx,
|
|
225
226
|
children: /* @__PURE__ */jsx5(ReactMarkdown, {
|
|
227
|
+
plugins: [remarkGfm],
|
|
226
228
|
...props,
|
|
227
229
|
children
|
|
228
230
|
})
|
package/dist/index.js
CHANGED
|
@@ -262,6 +262,7 @@ var ToastContainer = props => {
|
|
|
262
262
|
// src/components/Markdown.tsx
|
|
263
263
|
var import_ui5 = require("@ttoss/ui");
|
|
264
264
|
var import_react_markdown = __toESM(require("react-markdown"));
|
|
265
|
+
var import_remark_gfm = __toESM(require("remark-gfm"));
|
|
265
266
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
266
267
|
var Markdown = ({
|
|
267
268
|
children,
|
|
@@ -271,6 +272,7 @@ var Markdown = ({
|
|
|
271
272
|
return /* @__PURE__ */(0, import_jsx_runtime5.jsx)(import_ui5.BaseStyles, {
|
|
272
273
|
sx,
|
|
273
274
|
children: /* @__PURE__ */(0, import_jsx_runtime5.jsx)(import_react_markdown.default, {
|
|
275
|
+
plugins: [import_remark_gfm.default],
|
|
274
276
|
...props,
|
|
275
277
|
children
|
|
276
278
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ttoss/components",
|
|
3
|
-
"version": "1.29.
|
|
3
|
+
"version": "1.29.19",
|
|
4
4
|
"description": "React components for ttoss ecosystem.",
|
|
5
5
|
"author": "ttoss",
|
|
6
6
|
"contributors": [
|
|
@@ -26,7 +26,8 @@
|
|
|
26
26
|
"react-accessible-accordion": "^5.0.0",
|
|
27
27
|
"react-markdown": "6.0.0",
|
|
28
28
|
"react-modal": "^3.16.1",
|
|
29
|
-
"react-toastify": "^9.1.3"
|
|
29
|
+
"react-toastify": "^9.1.3",
|
|
30
|
+
"remark-gfm": "1.0.0"
|
|
30
31
|
},
|
|
31
32
|
"peerDependencies": {
|
|
32
33
|
"react": ">=16.8.0",
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { BaseStyles, FlexProps } from '@ttoss/ui';
|
|
2
2
|
import ReactMarkdown, { ReactMarkdownOptions } from 'react-markdown';
|
|
3
|
+
import remarkGfm from 'remark-gfm';
|
|
3
4
|
|
|
4
5
|
export type MarkdownProps = ReactMarkdownOptions & {
|
|
5
6
|
children: string;
|
|
@@ -9,7 +10,9 @@ export type MarkdownProps = ReactMarkdownOptions & {
|
|
|
9
10
|
export const Markdown = ({ children, sx, ...props }: MarkdownProps) => {
|
|
10
11
|
return (
|
|
11
12
|
<BaseStyles sx={sx}>
|
|
12
|
-
<ReactMarkdown {...props}>
|
|
13
|
+
<ReactMarkdown plugins={[remarkGfm]} {...props}>
|
|
14
|
+
{children}
|
|
15
|
+
</ReactMarkdown>
|
|
13
16
|
</BaseStyles>
|
|
14
17
|
);
|
|
15
18
|
};
|