realtime-data-cli-tool
Version:
A real-time data dashboard CLI tool built with Ink, React, and TypeScript that displays live ISS location, weather, Bitcoin prices, random facts, and inspirational quotes
16 lines (15 loc) • 816 B
JavaScript
import React from 'react';
import { Box, Text } from 'ink';
export const Header = ({ name, currentTime }) => {
return (React.createElement(Box, { borderStyle: "double", padding: 1, marginBottom: 1 },
React.createElement(Box, { flexDirection: "column", width: "100%" },
React.createElement(Box, { justifyContent: "center" },
React.createElement(Text, { color: "rainbow" }, "\uD83C\uDF1F REAL-TIME DATA DASHBOARD \uD83C\uDF1F")),
React.createElement(Box, { justifyContent: "center" },
React.createElement(Text, { color: "gray" },
"Welcome, ",
React.createElement(Text, { color: "green" }, name),
"! |",
' ',
currentTime.toLocaleTimeString())))));
};