From 59dc70160eb168d485647514395a79f004e87d1b Mon Sep 17 00:00:00 2001 From: Piyush Bhatt <2023kuec2027@iiitkota.ac.in> Date: Thu, 9 Jan 2025 01:16:59 +0530 Subject: [PATCH 1/4] add missing css for blockquote --- packages/markups/src/blocks/QuoteBlock.js | 25 ++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/packages/markups/src/blocks/QuoteBlock.js b/packages/markups/src/blocks/QuoteBlock.js index 3717ab150..71086d549 100644 --- a/packages/markups/src/blocks/QuoteBlock.js +++ b/packages/markups/src/blocks/QuoteBlock.js @@ -1,14 +1,25 @@ import React from 'react'; import PropTypes from 'prop-types'; import ParagraphBlock from './ParagraphBlock'; +import { css } from '@emotion/react'; +import { useTheme } from '@embeddedchat/ui-elements'; -const QuoteBlock = ({ contents }) => ( -
- {contents.map((paragraph, index) => ( - - ))} -
-); +const QuoteBlock = ({ contents }) => { + const { theme } = useTheme(); + return ( +
+ {contents.map((paragraph, index) => ( + + ))} +
+ ); +}; export default QuoteBlock; From dc034ec2b0b001bf1ecd04b5b2266981072e0e38 Mon Sep 17 00:00:00 2001 From: Piyush Bhatt <2023kuec2027@iiitkota.ac.in> Date: Thu, 9 Jan 2025 02:38:11 +0530 Subject: [PATCH 2/4] lint --- packages/markups/src/blocks/QuoteBlock.js | 6 +++--- packages/markups/src/elements/CodeBlock.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/markups/src/blocks/QuoteBlock.js b/packages/markups/src/blocks/QuoteBlock.js index 71086d549..8d2d17125 100644 --- a/packages/markups/src/blocks/QuoteBlock.js +++ b/packages/markups/src/blocks/QuoteBlock.js @@ -1,8 +1,8 @@ import React from 'react'; import PropTypes from 'prop-types'; -import ParagraphBlock from './ParagraphBlock'; -import { css } from '@emotion/react'; import { useTheme } from '@embeddedchat/ui-elements'; +import { css } from '@emotion/react'; +import ParagraphBlock from './ParagraphBlock'; const QuoteBlock = ({ contents }) => { const { theme } = useTheme(); @@ -12,7 +12,7 @@ const QuoteBlock = ({ contents }) => { background-color: ${theme.colors.secondary}; border-left: 1.7px solid ${theme.colors.primary}; padding-left: 0.5rem; - `} + `} > {contents.map((paragraph, index) => ( diff --git a/packages/markups/src/elements/CodeBlock.js b/packages/markups/src/elements/CodeBlock.js index 54bad69fc..d2d93901e 100644 --- a/packages/markups/src/elements/CodeBlock.js +++ b/packages/markups/src/elements/CodeBlock.js @@ -1,4 +1,4 @@ -import React, { useMemo, useEffect, useState } from 'react'; +import React, { useMemo } from 'react'; import PropTypes from 'prop-types'; import { Box, useTheme } from '@embeddedchat/ui-elements'; import SyntaxHighlighter from 'react-syntax-highlighter'; From dec8e0a353595280c0e7eb0dc06027e6692c0ae2 Mon Sep 17 00:00:00 2001 From: Piyush Bhatt <2023kuec2027@iiitkota.ac.in> Date: Sat, 11 Jan 2025 16:16:02 +0530 Subject: [PATCH 3/4] also take care of empty string after > --- packages/markups/src/elements/PlainSpan.js | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/packages/markups/src/elements/PlainSpan.js b/packages/markups/src/elements/PlainSpan.js index cc52613c0..16bb46923 100644 --- a/packages/markups/src/elements/PlainSpan.js +++ b/packages/markups/src/elements/PlainSpan.js @@ -1,8 +1,26 @@ import React from 'react'; import PropTypes from 'prop-types'; +import { css } from '@emotion/react'; +import { useTheme } from '@embeddedchat/ui-elements'; -const PlainSpan = ({ contents }) => <>{contents}; - +const PlainSpan = ({ contents }) => { + console.log(contents); + const { theme } = useTheme(); + if (contents === '>') { + return ( +
+   +
+ ); + } + return <>{contents}; +}; export default PlainSpan; PlainSpan.propTypes = { From 9e923190f7b924b2c7b2cbc6c8c7c3220a60de01 Mon Sep 17 00:00:00 2001 From: Piyush Bhatt <2023kuec2027@iiitkota.ac.in> Date: Sun, 12 Jan 2025 08:13:45 +0530 Subject: [PATCH 4/4] fix --- packages/markups/src/elements/PlainSpan.js | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/markups/src/elements/PlainSpan.js b/packages/markups/src/elements/PlainSpan.js index 16bb46923..15b4256a8 100644 --- a/packages/markups/src/elements/PlainSpan.js +++ b/packages/markups/src/elements/PlainSpan.js @@ -4,7 +4,6 @@ import { css } from '@emotion/react'; import { useTheme } from '@embeddedchat/ui-elements'; const PlainSpan = ({ contents }) => { - console.log(contents); const { theme } = useTheme(); if (contents === '>') { return (