Files
ServerKit/frontend/src/components/ds/ServiceTile.jsx
T
Juan DenisandClaude Opus 4.8 326bc89679 feat(ui): redesign foundation — tokens, self-hosted fonts, primitives, sidebar
Phase 0 of the ServerKit UI redesign (see docs/REDESIGN_MAP.md):
- Remap design tokens to the new infra-console palette behind existing names; add prototype token names (surface ramp, cyan/violet, accent-bright/-bg). Dark/light/system.
- Self-host IBM Plex (woff2 vendored via scripts/fetch-fonts.mjs); no Google Fonts CDN.
- Runtime-derive the full accent ramp in ThemeContext.
- Add shared design-system primitives in components/ds (Pill, EnvTag, SegControl, MetricCard, Gauge, ServiceTile, Sparkline, AreaChart, ScoreGauge, Feed, Drawer).
- Restyle the sidebar (gradient rail, mono section headers, left accent bar) and switch the brand to the demo's gradient-tile logo.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-07 03:34:28 -04:00

25 lines
756 B
React

import { cn } from '@/lib/utils';
import { svcGrad, initials } from './utils';
// Gradient initial avatar. Defaults to a deterministic gradient + first letter
// derived from `name`; pass `gradient` and/or `label` to override.
export function ServiceTile({ name = '', size = 38, label, gradient, className, style, ...props }) {
return (
<span
className={cn('sk-tile', className)}
style={{
width: size,
height: size,
fontSize: Math.round(size * 0.4),
background: gradient || svcGrad(name),
...style,
}}
{...props}
>
{label || initials(name)}
</span>
);
}
export default ServiceTile;