zhconv 0.4.1

Traditional, Simplified and regional Chinese variants converter powered by MediaWiki & OpenCC rulesets and the Aho-Corasick algorithm 中文简繁及地區詞轉換
Documentation
import { useMemo } from "react";
import Typography from "@mui/material/Typography";
import Box from "@mui/material/Box";

import { countLines } from "../utils";

export default function OutputStatusLine({
  output,
}: {
  output: string | undefined;
}) {
  return (
    <Typography variant="caption" color="textSecondary">
      Lines/橫行: {useMemo(() => countLines(output), [output])}
      <Box component="span" sx={{ marginLeft: "0.3em", marginRight: "0.3em" }}>
        ・
      </Box>
      Chars/字: {output ? output.length : 0}
    </Typography>
  );
}