OOKNET                             [ /  search the index  ]  
──────────────────────────────────────────────────────────────────────────────────────
══════════════════════════════════════════════════════════════════════════════════════
OOKNET   [ /  search  ]  
────────────────────────────────────────────────
════════════════════════════════════════════════
 
 
master @ 17 LINES
 
[ HISTORY ]  [ UP ]
 

import { len } from "../../lib/ascii";

export interface MenuItem {
  label: string;
  href?: string;
}

export interface Props {
  label: string;
  items: MenuItem[];
  /** Inner width in cells; defaults to the widest item label. */
  cells?: number;
}

export const menuCells = (items: MenuItem[]) =>
  Math.max(1, ...items.map((it) => len(it.label)));

import { len } from "../../lib/ascii";

export interface MenuItem {
  label: string;
  href?: string;
}

export interface Props {
  label: string;
  items: MenuItem[];
  /** Inner width in cells; defaults to the 
widest item label. */
  cells?: number;
}

export const menuCells = (items: MenuItem[])
 =>
  Math.max(1, ...items.map((it) => len(it.la
bel)));
 
──────────────────────────────────────────────────────────────────────────────────────
OOKNET
────────────────────────────────────────────────
OOKNET