UNPKG

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

19 lines (18 loc) 1.07 kB
import React from 'react'; import { Box, Text } from 'ink'; export const WeatherDisplay = ({ weather }) => { return (React.createElement(Box, { borderStyle: "round", padding: 2, margin: 1, width: 50 }, React.createElement(Box, { flexDirection: "column" }, React.createElement(Text, { color: "magenta" }, "\uD83C\uDF24\uFE0F WEATHER"), React.createElement(Text, { color: "white" }, "\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"), weather ? (React.createElement(React.Fragment, null, React.createElement(Text, { color: "cyan" }, weather.location), React.createElement(Text, { color: "yellow" }, weather.temperature, "\u00B0C - ", weather.description), React.createElement(Text, { color: "green" }, "Humidity: ", weather.humidity, "%"))) : (React.createElement(Text, { color: "red" }, "Loading weather..."))))); };