From a8bc7f703718957d294d1f54c3dde00cd0160b35 Mon Sep 17 00:00:00 2001 From: amirhouieh Date: Thu, 19 May 2022 15:12:03 +0200 Subject: [PATCH] add paragraph component with props --- templates/Deafult/Style.module.css | 12 ++++++++++++ .../markdown/components/ui-components/Paragraph.tsx | 10 ++++++---- 2 files changed, 18 insertions(+), 4 deletions(-) diff --git a/templates/Deafult/Style.module.css b/templates/Deafult/Style.module.css index aab7882..07ff56b 100644 --- a/templates/Deafult/Style.module.css +++ b/templates/Deafult/Style.module.css @@ -111,8 +111,20 @@ .container :global(.logos-paragraph) p{ white-space: break-spaces; +} +.container :global(.logos-paragraph.x) p{ + column-count: 1; +} +.container :global(.logos-paragraph.xx) p{ column-count: 2; } +.container :global(.logos-paragraph.xxx) p{ + column-count: 3; +} +.container :global(.logos-paragraph.xxxx) p{ + column-count: 4; +} + .container p{ margin-top: 0; diff --git a/templates/Deafult/markdown/components/ui-components/Paragraph.tsx b/templates/Deafult/markdown/components/ui-components/Paragraph.tsx index 92754ee..301d429 100644 --- a/templates/Deafult/markdown/components/ui-components/Paragraph.tsx +++ b/templates/Deafult/markdown/components/ui-components/Paragraph.tsx @@ -1,14 +1,16 @@ import {FC, PropsWithChildren} from "react"; +import {logosCustomMarkdownLanguages} from "../../configs"; interface IProps{ - + columns?: number } export const Paragraph: FC> = (props) => { - const {children} = props; + const {children, columns = 2} = props; + const cClass = new Array(columns).fill(null).map(c => `x`).join(""); return ( - <> +
{children} - +
) } \ No newline at end of file