Download packages/tui/src/component/todo-item.tsx from SaylorTwift/opencode: direct link, hf CLI and curl.
- Browser
- Download file 740 Bytes
-
https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/tui/src/component/todo-item.tsx
- Command line
-
hf download hf://SaylorTwift/opencode/packages/tui/src/component/todo-item.tsx
-
curl -L -o todo-item.tsx https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/tui/src/component/todo-item.tsx
740 Bytes
| import { useTheme } from "../context/theme" | |
| export interface TodoItemProps { | |
| status: string | |
| content: string | |
| } | |
| export function TodoItem(props: TodoItemProps) { | |
| const { theme } = useTheme() | |
| return ( | |
| <box flexDirection="row" gap={0}> | |
| <text | |
| flexShrink={0} | |
| style={{ | |
| fg: props.status === "in_progress" ? theme.warning : theme.textMuted, | |
| }} | |
| > | |
| [{props.status === "completed" ? "✓" : props.status === "in_progress" ? "•" : " "}]{" "} | |
| </text> | |
| <text | |
| flexGrow={1} | |
| wrapMode="word" | |
| style={{ | |
| fg: props.status === "in_progress" ? theme.warning : theme.textMuted, | |
| }} | |
| > | |
| {props.content} | |
| </text> | |
| </box> | |
| ) | |
| } | |