UNPKG

terminal-lite

Version:

A lightweight customizable terminal-like React component.

6 lines (5 loc) 825 B
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime"; const Terminal = ({ title, children }) => { return (_jsx(_Fragment, { children: _jsxs("div", { className: `bg-[#151515] border-2 border-primary-border h-full`, children: [_jsx("div", { className: "h-9 bg-primary-border-dark flex items-center justify-between px-2 font-tech-mono font-bold text-[#efefef] text-[12px]", children: _jsx("div", { className: "flex-1", children: title }) }), _jsx("div", { className: "text-[#ffffffc2] p-2 font-tech-mono overflow-y-auto h-[calc(100%-36px)] scrollbar scrollbar-thumb-[#727272] scrollbar-track-[#181818]", children: children ? (children) : (_jsxs(_Fragment, { children: ["> npm run dev", _jsx("span", { className: "animate-blink", children: "_" })] })) })] }) })); }; export default Terminal;