Skip to content

Commit

Permalink
Update GetMArkdownComponents
Browse files Browse the repository at this point in the history
  • Loading branch information
Nadai2010 committed Sep 1, 2024
1 parent 470a92a commit 79e1794
Showing 1 changed file with 15 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,11 @@ import { Components } from "react-markdown";

export const getMarkdownComponents = (): Components => {
return {
h1: ({ children }) => {
return (
<h1 className="text-primary text-4xl font-bold py-4 border-b border-[#1c2d49] mb-2 sm:text-lg ">
{children}
</h1>
);
},
h1: ({ children }) => (
<h1 className="text-primary text-4xl font-bold py-4 border-b border-[#1c2d49] mb-2 sm:text-lg ">
{children}
</h1>
),
h2: ({ children }) => (
<h2 className="text-primary text-3xl font-bold py-3 sm:text-sm sm:m-0">
{children}
Expand Down Expand Up @@ -50,8 +48,16 @@ export const getMarkdownComponents = (): Components => {
{children}
</blockquote>
),
li: ({ children }) => (
<li className="list-disc text-base sm:text-xs lg:text-sm ">{children}</li>
ul: ({ children }) => (
<ul className="list-disc pl-5 ml-0 text-base sm:text-xs lg:text-sm">
{children}
</ul>
),
ol: ({ children }) => (
<ol className="list-decimal pl-5 ml-0 text-base sm:text-xs lg:text-sm">
{children}
</ol>
),
li: ({ children }) => <li className="ml-2">{children}</li>,
};
};

0 comments on commit 79e1794

Please sign in to comment.