@connectif/ui-components 1.0.7 → 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
- declare const MarkdownRenderer: ({ text }: {
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
- fontFamily: "Segoe UI, sans-serif",
23657
- lineHeight: 1.6,
23658
- color: "#f1f1f1",
23659
- backgroundColor: "#1a1a1a",
23660
- padding: "16px",
23661
- borderRadius: "8px",
23662
- overflowWrap: "break-word",
23663
- "& h1, & h2, & h3": {
23664
- color: "#ffffff",
23665
- marginTop: "1.5em"
23666
- },
23667
- "& h1": { fontSize: "1.75rem" },
23668
- "& h2": { fontSize: "1.5rem" },
23669
- "& h3": { fontSize: "1.25rem" },
23670
- "& p": {
23671
- margin: "0.5em 0"
23672
- },
23673
- "& ul, & ol": {
23674
- paddingLeft: "1.5em",
23675
- margin: "0.5em 0"
23676
- },
23677
- "& li": {
23678
- marginBottom: "0.25em"
23679
- },
23680
- "& code": {
23681
- background: "#333",
23682
- padding: "2px 6px",
23683
- borderRadius: "4px",
23684
- fontFamily: "Courier New, monospace",
23685
- fontSize: "0.9em"
23686
- },
23687
- "& pre code": {
23688
- display: "block",
23689
- padding: "12px",
23690
- overflowX: "auto"
23691
- },
23692
- "& table": {
23693
- width: "100%",
23694
- borderCollapse: "collapse",
23695
- margin: "1em 0"
23696
- },
23697
- "& th, & td": {
23698
- border: "1px solid #444",
23699
- padding: "8px",
23700
- textAlign: "left"
23701
- },
23702
- "& th": {
23703
- backgroundColor: "#2a2a2a"
23704
- },
23705
- "& a": {
23706
- color: "#61dafb",
23707
- textDecoration: "none"
23708
- },
23709
- "& a:hover": {
23710
- textDecoration: "underline"
23711
- }
23712
- }));
23713
- var MarkdownRenderer = ({ text }) => /* @__PURE__ */ jsx136(MarkdownContainer, { children: /* @__PURE__ */ jsx136(ReactMarkdown, { remarkPlugins: [remarkGfm], skipHtml: true, children: text }) });
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