@dugongjs/cli
Version:
8 lines (7 loc) • 551 B
JavaScript
import { Box, Text } from "ink";
import React from "react";
export const Pane = React.forwardRef(function Pane(props, ref) {
const { isFocused, isLoading, children } = props;
return (React.createElement(Box, { ref: ref, width: "100%", height: "100%", flexDirection: "column", paddingX: 1, borderColor: isFocused ? "green" : "gray", borderStyle: "round" }, isLoading ? (React.createElement(Box, { flexDirection: "column", width: "100%", height: "100%" },
React.createElement(Text, { color: "gray" }, "Loading..."))) : (children)));
});