import React from "react"; import { Box, Text } from "ink"; export interface FooterAction { key: string; description: string; } export interface FooterProps { actions: FooterAction[]; separator?: string; } /** * Footer component - displays keyboard actions * Optimized with React.memo to prevent unnecessary re-renders */ export const Footer = React.memo(function Footer({ actions, separator = " ", }: FooterProps) { if (actions.length === 0) { return null; } return ( {actions.map((action, index) => ( [ {action.key} ] {action.description} {index < actions.length - 1 && {separator}} ))} ); });