Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

577 B
Raw Blame
import { useContext } from "react";
import { Text, type StyleProp, type TextStyle } from "react-native";

import { useColors } from "@/theme";

import { TaskItemCheckedContext } from "./markdown-task-item";

export function MarkdownTextRun({
  content,
  style,
}: {
  content: string;
  style: StyleProp<TextStyle>;
}) {
  const c = useColors();
  const checked = useContext(TaskItemCheckedContext);
  return (
    <Text
      style={[
        style,
        checked && { color: c.faint, textDecorationLine: "line-through" },
      ]}
    >
      {content}
    </Text>
  );
}