Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
omni-code / tui / dist / components / Panel.js
Size: Mime:
import React from "react";
import { Box, Text, useStdout } from "ink";
export function Panel({ title, focused = false, height, width, flexGrow, flexShrink, children, badge, }) {
    const borderColor = focused ? "cyan" : "gray";
    return (React.createElement(Box, { flexDirection: "column", borderStyle: "single", borderColor: borderColor, height: height, width: width, flexGrow: flexGrow, flexShrink: flexShrink, overflow: "hidden" },
        title ? (React.createElement(Box, null,
            React.createElement(Text, { color: borderColor, bold: focused }, title),
            badge ? (React.createElement(React.Fragment, null,
                React.createElement(Text, null, " "),
                badge)) : null)) : null,
        children));
}
export function useTerminalSize() {
    const { stdout } = useStdout();
    return {
        cols: stdout?.columns ?? 80,
        rows: stdout?.rows ?? 24,
    };
}
//# sourceMappingURL=Panel.js.map