minyeamer commented on code in PR #66809:
URL: https://github.com/apache/airflow/pull/66809#discussion_r3249157353


##########
airflow-core/src/airflow/ui/src/components/ReactMarkdown.tsx:
##########
@@ -106,81 +122,107 @@ const UlComponent = ({ children }: PropsWithChildren) => 
(
   </List.Root>
 );
 
-// Factory function for the code component that needs style
-const createCodeComponent =
-  (style: typeof oneDark | typeof oneLight) =>
-  ({
-    children,
-    className,
-    inline,
-  }: {
-    readonly children: ReactNode;
-    readonly className?: string;
-    readonly inline?: boolean;
-  }) => {
-    if (inline) {
-      return (
-        <Code display="inline" p={2}>
-          {children}
-        </Code>
-      );
+type CodeElementProps = {
+  readonly children?: ReactNode;
+  readonly className?: string;
+};

Review Comment:
   They represent different contracts. Here we are inspecting the 
`react-markdown` code child element before rendering, specifically its 
markdown-derived `className` and `children`, not the props of Chakra's rendered 
`Code` component. I've renamed the local type to `MarkdownCodeElementProps` to 
make this distinction clearer.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to