Refactor MarkdownDisplay and MarkdownInput components for improved rendering and user experience. Adjust spacing in NoteItem for better layout consistency.
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good
All checks were successful
farmcontrol/farmcontrol-ui/pipeline/head This commit looks good
This commit is contained in:
parent
bfbec30a75
commit
aa2e7b85ed
@ -41,7 +41,7 @@ const MarkdownDisplay = ({ content }) => {
|
||||
ul: UlComponent,
|
||||
ol: OlComponent,
|
||||
li: LiComponent,
|
||||
strong: (props) => <Text strong {...props} />,
|
||||
strong: (props) => <strong {...props} />,
|
||||
em: (props) => <Text italic {...props} />,
|
||||
code: ({ inline, ...props }) =>
|
||||
inline ? (
|
||||
@ -55,7 +55,7 @@ const MarkdownDisplay = ({ content }) => {
|
||||
}
|
||||
|
||||
return (
|
||||
<div className="markdown markdown-display">
|
||||
<div className='markdown markdown-display'>
|
||||
<ReactMarkdown remarkPlugins={[remarkGfm]} components={components}>
|
||||
{content}
|
||||
</ReactMarkdown>
|
||||
|
||||
@ -103,6 +103,7 @@ const MarkdownInput = ({
|
||||
<CodeBlockEditor
|
||||
code={markdownValue}
|
||||
language='markdown'
|
||||
showLineNumbers={false}
|
||||
style={{ border: 'none' }}
|
||||
onChange={(val) => {
|
||||
onChange?.(val)
|
||||
|
||||
@ -168,7 +168,7 @@ const NoteItem = ({
|
||||
<PersonIcon />
|
||||
<Text style={{ whiteSpace: 'nowrap' }}>{note.user.name}:</Text>
|
||||
</Space>
|
||||
<div style={{ marginBottom: '4px' }}>
|
||||
<div style={{ marginTop: '4px' }}>
|
||||
<MarkdownDisplay content={note.content} />
|
||||
</div>
|
||||
</Flex>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user