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
10 lines (9 loc) • 904 B
JavaScript
import React from 'react';
import { Box, Text } from 'ink';
export const RandomFact = ({ fact }) => {
return (React.createElement(Box, { borderStyle: "round", padding: 2, margin: 1, width: 70 },
React.createElement(Box, { flexDirection: "column" },
React.createElement(Text, { color: "cyan" }, "\uD83E\uDDE0 RANDOM FACT"),
React.createElement(Text, { color: "white" }, "\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501\u2501"),
fact ? (React.createElement(Text, { color: "white" }, fact.text)) : (React.createElement(Text, { color: "red" }, "Loading fact...")))));
};