@hhoangphuoc/escape-room-cli
Version:
A CLI for playing AI-generated escape room games. Install globally with: npm install -g @hhoangphuoc/escape-room-cli
10 lines (9 loc) • 686 B
JavaScript
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
import { Box, Text } from 'ink';
const ObjectsDisplay = ({ objects }) => {
if (!objects || objects.length === 0) {
return null;
}
return (_jsxs(Box, { borderStyle: "round", paddingX: 1, marginBottom: 1, flexDirection: "column", children: [_jsx(Text, { bold: true, children: "Objects in Room" }), _jsx(Box, { flexWrap: "wrap", children: objects.map(obj => (_jsx(Box, { marginRight: 2, children: _jsxs(Text, { children: [obj.name, ' ', _jsx(Text, { color: obj.unlocked ? 'green' : 'red', children: obj.unlocked ? '[Unlocked]' : '[Locked]' })] }) }, obj.name))) })] }));
};
export default ObjectsDisplay;