< Summary

Information
Class: tui-widgets.tsx
Assembly: app.components
File(s): /home/runner/work/ClutterStock/ClutterStock/frontend/app/components/tui-widgets.tsx
Tag: 58_25416222083
Line coverage
0%
Covered lines: 0
Uncovered lines: 7
Coverable lines: 7
Total lines: 37
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

File(s)

/home/runner/work/ClutterStock/ClutterStock/frontend/app/components/tui-widgets.tsx

#LineLine coverage
 01export function TuiPanel({ title, as: Tag = "div", children, style }: {
 2  title?: string;
 3  as?: "div" | "aside";
 4  children: React.ReactNode;
 5  style?: React.CSSProperties;
 6}) {
 07  return (
 8    <Tag className="tui-panel" style={style}>
 9      {title && <span className="tui-panel-title">{title}</span>}
 10      {children}
 11    </Tag>
 12  );
 13}
 14
 015export function TuiStatusBar({ onOpenTerminal }: { onOpenTerminal?: () => void }) {
 016  const bindings: [string, string][] = [
 17    ["j k", "move"], ["gg/G", "first/last"], ["e", "edit"], ["d", "del"],
 18    ["o", "new"], ["/", "filter"], [":", "term"], ["Alt+1/2/3", "panes"], ["?", "help"],
 19  ];
 020  return (
 21    <div className="tui-statusbar">
 022      {bindings.map(([k, l]) => (
 023        <span key={k}>
 24          <span className="tui-statusbar-key">{k}</span>{" "}{l}
 25        </span>
 26      ))}
 27      <button
 28        type="button"
 29        onClick={onOpenTerminal}
 30        className="tui-statusbar-prompt"
 31        aria-label="Open terminal"
 32      >
 33        $ _<span className="tui-cursor">▌</span>
 34      </button>
 35    </div>
 36  );
 37}