From a6a83fe65a7232f2eaba8fa8667d24a7127dd0dd Mon Sep 17 00:00:00 2001 From: jorgemike Date: Sat, 22 Mar 2025 18:12:54 -0500 Subject: [PATCH] fix build --- src/app/(components)/button/page.tsx | 151 +++++++++++++++++------ src/components/checkbox-option-group.tsx | 6 +- src/components/radio-option-group.tsx | 4 +- 3 files changed, 118 insertions(+), 43 deletions(-) diff --git a/src/app/(components)/button/page.tsx b/src/app/(components)/button/page.tsx index f7d1e20..fc8642e 100644 --- a/src/app/(components)/button/page.tsx +++ b/src/app/(components)/button/page.tsx @@ -5,7 +5,6 @@ import VistaComponente from "@/components/vista-componente"; import Button from "@/components/button"; export default function Page() { - return ( <> `} > - + -
-

⚙️ Props del componente

-
    -
  • - variant?: string – Clase base del botón. Ej:{" "} - "primary", "danger". -
  • -
  • - outline?: boolean – Si el botón debe usar estilo{" "} - outline. -
  • -
  • - icon?: string | ReactNode – Ícono Bootstrap (por - nombre) o componente React. -
  • -
  • - size?: "sm" | "lg" – Tamaño del botón. -
  • -
  • - className?: string – Clases adicionales para el - botón. -
  • -
  • - type?: "button" | "submit" | "reset" – Tipo de botón. -
  • -
  • - disabled?: boolean – Desactiva el botón. -
  • -
  • - children: ReactNode – Contenido del botón. -
  • -
  • - ...rest – Cualquier otra prop válida de{" "} - <button>. -
  • -
+ {/* PROPS */} +
+

⚙️ Props del componente

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
PropTipoDescripción
+ variant? + + string + + Clase base del botón. Ej: "primary",{" "} + "danger", etc. +
+ outline? + + boolean + + Si el botón debe usar el estilo outline. +
+ icon? + + string | ReactNode + + Ícono Bootstrap por nombre o un componente React + personalizado. +
+ size? + + "sm" | "lg" + Tamaño del botón, usando clases de Bootstrap.
+ className? + + string + Clases adicionales para el botón.
+ type? + + + "button" | "submit" | "reset" + + Tipo del botón HTML.
+ disabled? + + boolean + + Desactiva el botón cuando es true. +
+ children + + ReactNode + Contenido del botón (texto o nodos).
+ ...rest + + ButtonHTMLAttributes<HTMLButtonElement> + + Soporta todas las props válidas de <button>{" "} + nativo. +
diff --git a/src/components/checkbox-option-group.tsx b/src/components/checkbox-option-group.tsx index 66720ac..cb09ca5 100644 --- a/src/components/checkbox-option-group.tsx +++ b/src/components/checkbox-option-group.tsx @@ -1,12 +1,12 @@ import React from "react"; -export interface CheckboxOption { +export interface CheckboxOption { label: string; value: T; disabled?: boolean; } -interface CheckboxOptionGroupProps { +interface CheckboxOptionGroupProps { name: string; options: CheckboxOption[]; selectedValues: T[]; @@ -16,7 +16,7 @@ interface CheckboxOptionGroupProps { className?: string; } -export default function CheckboxOptionGroup({ +export default function CheckboxOptionGroup({ name, options, selectedValues, diff --git a/src/components/radio-option-group.tsx b/src/components/radio-option-group.tsx index 1501b27..cc2bc2c 100644 --- a/src/components/radio-option-group.tsx +++ b/src/components/radio-option-group.tsx @@ -1,12 +1,12 @@ import React from "react"; -export interface RadioOption { +export interface RadioOption { label: string; value: T; disabled?: boolean; } -interface RadioOptionGroupProps { +interface RadioOptionGroupProps { name: string; options: RadioOption[]; selectedValue?: T;