Files
fn_registry/frontend/functions/ui/alert.md
T
egutierrez 87e8f33b01 fix: corregir lang y file_path en frontmatter de funciones existentes
Normaliza lang: typescript → ts en funciones frontend y corrige file_path de functions/infra/ → functions/browser/ en funciones CDP. Actualiza referencias cn_typescript_core → cn_ts_core.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 03:23:20 +02:00

1.4 KiB

name, kind, lang, domain, version, purity, signature, description, tags, uses_functions, uses_types, returns, returns_optional, error_type, imports, tested, tests, test_file_path, file_path, props, emits, has_state, framework, variant, source_repo, source_license, source_file
name kind lang domain version purity signature description tags uses_functions uses_types returns returns_optional error_type imports tested tests test_file_path file_path props emits has_state framework variant source_repo source_license source_file
alert component ts ui 1.0.0 impure Alert(props: { variant?: 'default' | 'destructive' }): JSX.Element Alerta accesible con variantes default y destructive. Sistema de slots para título, descripción, icono y acción.
alert
feedback
component
ui
notification
cn_ts_core
false
react
class-variance-authority
false
frontend/functions/ui/alert.tsx
name type required description
variant 'default' | 'destructive' false Variante visual
false react
default
destructive
https://gitea-dgg044oo04woo4ggcsws4gk0.organic-machine.com/Bl4cksmith/Frontend_Library MIT frontend/src/components/ui/alert.tsx

Ejemplo

<Alert variant="destructive">
  <AlertCircle />
  <AlertTitle>Error</AlertTitle>
  <AlertDescription>Something went wrong.</AlertDescription>
</Alert>

Notas

Exporta 4 subcomponentes composables via data-slot: Alert, AlertTitle, AlertDescription, AlertAction. El icono SVG se posiciona automáticamente en grid cuando es hijo directo de Alert. AlertAction se posiciona absolute top-right para acciones secundarias (ej: botón cerrar).