@connectif/ui-components 1.0.6 → 1.0.8
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.
|
@@ -1,4 +1,10 @@
|
|
|
1
|
-
|
|
1
|
+
import { TypographyVariant } from '../../theme/Typography';
|
|
2
|
+
type MarkdownContainerProps = {
|
|
3
|
+
color: string;
|
|
4
|
+
backgroundColor?: string;
|
|
5
|
+
variant?: TypographyVariant;
|
|
6
|
+
};
|
|
7
|
+
declare const MarkdownRenderer: ({ text, ...rest }: MarkdownContainerProps & {
|
|
2
8
|
text: string;
|
|
3
9
|
}) => import("react/jsx-runtime").JSX.Element;
|
|
4
10
|
export default MarkdownRenderer;
|
package/dist/index.js
CHANGED
|
@@ -23652,65 +23652,69 @@ import ReactMarkdown from "react-markdown";
|
|
|
23652
23652
|
import remarkGfm from "remark-gfm";
|
|
23653
23653
|
import { styled as styled9 } from "@mui/material/styles";
|
|
23654
23654
|
import { jsx as jsx136 } from "react/jsx-runtime";
|
|
23655
|
-
var MarkdownContainer = styled9("div")(
|
|
23656
|
-
|
|
23657
|
-
|
|
23658
|
-
|
|
23659
|
-
|
|
23660
|
-
|
|
23661
|
-
|
|
23662
|
-
|
|
23663
|
-
|
|
23664
|
-
|
|
23665
|
-
|
|
23666
|
-
|
|
23667
|
-
|
|
23668
|
-
|
|
23669
|
-
|
|
23670
|
-
|
|
23671
|
-
|
|
23672
|
-
|
|
23673
|
-
|
|
23674
|
-
|
|
23675
|
-
|
|
23676
|
-
|
|
23677
|
-
|
|
23678
|
-
|
|
23679
|
-
|
|
23680
|
-
|
|
23681
|
-
|
|
23682
|
-
|
|
23683
|
-
|
|
23684
|
-
|
|
23685
|
-
|
|
23686
|
-
|
|
23687
|
-
|
|
23688
|
-
|
|
23689
|
-
|
|
23690
|
-
|
|
23691
|
-
|
|
23692
|
-
|
|
23693
|
-
|
|
23694
|
-
|
|
23695
|
-
|
|
23696
|
-
|
|
23697
|
-
|
|
23698
|
-
|
|
23699
|
-
|
|
23700
|
-
|
|
23701
|
-
|
|
23702
|
-
|
|
23703
|
-
|
|
23704
|
-
|
|
23705
|
-
|
|
23706
|
-
|
|
23707
|
-
|
|
23708
|
-
|
|
23709
|
-
|
|
23710
|
-
|
|
23711
|
-
|
|
23712
|
-
})
|
|
23713
|
-
|
|
23655
|
+
var MarkdownContainer = styled9("div")(
|
|
23656
|
+
({ color: color2, backgroundColor: backgroundColor2 = "transparent", variant }) => ({
|
|
23657
|
+
color: color2,
|
|
23658
|
+
backgroundColor: backgroundColor2,
|
|
23659
|
+
borderRadius: "8px",
|
|
23660
|
+
overflowWrap: "break-word",
|
|
23661
|
+
"& h1, & h2, & h3": {
|
|
23662
|
+
color: color2
|
|
23663
|
+
},
|
|
23664
|
+
"& h1": { fontSize: "1.75rem" },
|
|
23665
|
+
"& h2": { fontSize: "1.5rem" },
|
|
23666
|
+
"& h3": { fontSize: "1.25rem" },
|
|
23667
|
+
"& p": {
|
|
23668
|
+
...variants[variant || "body2"],
|
|
23669
|
+
margin: "0.5em 0"
|
|
23670
|
+
},
|
|
23671
|
+
"& ul, & ol": {
|
|
23672
|
+
paddingLeft: "1.5em",
|
|
23673
|
+
margin: "0.5em 0"
|
|
23674
|
+
},
|
|
23675
|
+
"& li": {
|
|
23676
|
+
marginBottom: "0.25em"
|
|
23677
|
+
},
|
|
23678
|
+
"& code": {
|
|
23679
|
+
background: grey800,
|
|
23680
|
+
padding: "2px 6px",
|
|
23681
|
+
borderRadius: "4px",
|
|
23682
|
+
fontFamily: "Courier New, monospace",
|
|
23683
|
+
fontSize: "0.9em",
|
|
23684
|
+
color: white
|
|
23685
|
+
},
|
|
23686
|
+
"& pre code": {
|
|
23687
|
+
display: "block",
|
|
23688
|
+
padding: "12px",
|
|
23689
|
+
overflowX: "auto"
|
|
23690
|
+
},
|
|
23691
|
+
"& table": {
|
|
23692
|
+
width: "100%",
|
|
23693
|
+
borderCollapse: "collapse",
|
|
23694
|
+
margin: "1em 0"
|
|
23695
|
+
},
|
|
23696
|
+
"& th, & td": {
|
|
23697
|
+
border: `1px solid ${grey800}`,
|
|
23698
|
+
padding: "8px",
|
|
23699
|
+
textAlign: "left"
|
|
23700
|
+
},
|
|
23701
|
+
"& th": {
|
|
23702
|
+
backgroundColor: grey900,
|
|
23703
|
+
color: white
|
|
23704
|
+
},
|
|
23705
|
+
"& a": {
|
|
23706
|
+
color: primary200,
|
|
23707
|
+
textDecoration: "none"
|
|
23708
|
+
},
|
|
23709
|
+
"& a:hover": {
|
|
23710
|
+
textDecoration: "underline"
|
|
23711
|
+
}
|
|
23712
|
+
})
|
|
23713
|
+
);
|
|
23714
|
+
var MarkdownRenderer = ({
|
|
23715
|
+
text,
|
|
23716
|
+
...rest
|
|
23717
|
+
}) => /* @__PURE__ */ jsx136(MarkdownContainer, { ...rest, children: /* @__PURE__ */ jsx136(ReactMarkdown, { remarkPlugins: [remarkGfm], skipHtml: true, children: text }) });
|
|
23714
23718
|
var MarkdownRenderer_default = MarkdownRenderer;
|
|
23715
23719
|
|
|
23716
23720
|
// src/components/navbar/Navbar.tsx
|