UNPKG

@t1mmen/srtd

Version:

Supabase Repeatable Template Definitions (srtd): 🪄 Live-reloading SQL templates for Supabase DX. Make your database changes reviewable and migrations maintainable! 🚀

29 lines • 1.53 kB
import { Badge } from '@inkjs/ui'; import { Box, Text } from 'ink'; import React from 'react'; import packageJson from '../../package.json' with { type: 'json' }; import { useDatabaseConnection } from '../hooks/useDatabaseConnection.js'; import { COLOR_ERROR, COLOR_SUPABASE, COLOR_WARNING } from './customTheme.js'; export default function Branding({ subtitle }) { const { error, isConnected } = useDatabaseConnection(); const badgeColor = error ? COLOR_ERROR : isConnected ? COLOR_SUPABASE : COLOR_WARNING; return (React.createElement(Box, { marginBottom: 1, marginTop: 1, gap: 1, flexDirection: "column" }, React.createElement(Box, { gap: 1 }, React.createElement(Badge, { color: badgeColor }, " srtd "), subtitle ? (React.createElement(Text, null, subtitle)) : (React.createElement(Text, null, React.createElement(Text, { bold: true, color: COLOR_SUPABASE }, "S"), "upabase", ' ', React.createElement(Text, { bold: true, color: COLOR_SUPABASE }, "R"), "epeatable", ' ', React.createElement(Text, { bold: true, color: COLOR_SUPABASE }, "T"), "emplate", ' ', React.createElement(Text, { bold: true, color: COLOR_SUPABASE }, "D"), "efinitions")), React.createElement(Text, { dimColor: true }, " v", packageJson.version)))); } //# sourceMappingURL=Branding.js.map