Files
Momento/memento-note/components/dashboard-widget-title-row.tsx
Antigravity afbb0dfc2d
All checks were successful
CI / Lint, Unit Tests & Build (push) Successful in 6m57s
CI / Deploy production (on server) (push) Successful in 24s
fix(ui): thème, textes et lisibilité restants de la revue
Les boutons suivent la couleur d’apparence, les libellés trop petits ou trop techniques sont clarifiés, et le catalogue des fournisseurs se met à jour tout seul.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-08-30 21:13:07 +00:00

42 lines
1.2 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
'use client'
import type { ReactNode } from 'react'
import { DashboardWidgetHelp } from '@/components/dashboard-widget-help'
import type { DashboardWidgetId } from '@/lib/dashboard/layout'
interface DashboardWidgetTitleRowProps {
widgetId: DashboardWidgetId
icon?: ReactNode
title: string
actions?: ReactNode
className?: string
wrapTitle?: boolean
}
/** Titre widget : actions dabord, aide « ? » en dernier — ne masque jamais la navigation. */
export function DashboardWidgetTitleRow({
widgetId,
icon,
title,
actions,
className = 'mb-3',
wrapTitle,
}: DashboardWidgetTitleRowProps) {
return (
<div className={`flex items-start justify-between gap-2 ${className}`}>
<div className="flex items-start gap-2 min-w-0 flex-1">
{icon ? <span className="shrink-0 mt-0.5">{icon}</span> : null}
<h2 className={`text-[13px] font-semibold uppercase tracking-wider text-ink dark:text-dark-ink ${
wrapTitle ? 'leading-tight whitespace-normal' : 'truncate'
}`}>
{title}
</h2>
</div>
<div className="flex items-center gap-1.5 shrink-0">
{actions}
<DashboardWidgetHelp widgetId={widgetId} />
</div>
</div>
)
}