Download src/components/features/markdown/list.tsx from SaylorTwift/openhands: direct link, hf CLI and curl.
- Browser
- Download file 957 Bytes
-
https://huggingface.co/SaylorTwift/openhands/resolve/main/src/components/features/markdown/list.tsx
- Command line
-
hf download hf://SaylorTwift/openhands/src/components/features/markdown/list.tsx
-
curl -L -o list.tsx https://huggingface.co/SaylorTwift/openhands/resolve/main/src/components/features/markdown/list.tsx
957 Bytes
| import React from "react"; | |
| import { ExtraProps } from "react-markdown"; | |
| // Custom component to render <ul> in markdown | |
| export function ul({ | |
| children, | |
| }: React.ClassAttributes<HTMLUListElement> & | |
| React.HTMLAttributes<HTMLUListElement> & | |
| ExtraProps) { | |
| return ( | |
| <ul className="my-2 list-disc ml-5 pl-2 whitespace-normal leading-6"> | |
| {children} | |
| </ul> | |
| ); | |
| } | |
| // Custom component to render <ol> in markdown | |
| export function ol({ | |
| children, | |
| start, | |
| }: React.ClassAttributes<HTMLOListElement> & | |
| React.OlHTMLAttributes<HTMLOListElement> & | |
| ExtraProps) { | |
| return ( | |
| <ol | |
| className="my-2 list-decimal ml-5 pl-2 whitespace-normal leading-6" | |
| start={start} | |
| > | |
| {children} | |
| </ol> | |
| ); | |
| } | |
| // Custom component to render <li> in markdown | |
| export function li({ | |
| children, | |
| }: React.ClassAttributes<HTMLLIElement> & | |
| React.LiHTMLAttributes<HTMLLIElement> & | |
| ExtraProps) { | |
| return <li className="py-0.5">{children}</li>; | |
| } | |