diff --git a/public/button.png b/public/button.png new file mode 100644 index 0000000..5d52fec Binary files /dev/null and b/public/button.png differ diff --git a/src/app/(components)/button/page.tsx b/src/app/(components)/button/page.tsx index fc8642e..52251c4 100644 --- a/src/app/(components)/button/page.tsx +++ b/src/app/(components)/button/page.tsx @@ -1,68 +1,118 @@ -"use client"; +'use client'; -import IndiceContenido from "@/components/content-index"; -import VistaComponente from "@/components/vista-componente"; -import Button from "@/components/button"; +import IndiceContenido from '@/components/content-index'; +import VistaComponente from '@/components/vista-componente'; +import Button from '@/components/button'; export default function Page() { return ( <> -
-

+
+

🧩 Componente: Button

-

+

El componente <Button /> permite crear botones con estilos de Bootstrap, variantes personalizables, íconos opcionales y soporte completo para props de HTML estándar.

-
+
alert("¡Hola mundo!")}> Clic aquí `} > - Guardar `} > - +
+

+ Puedes consultar la lista completa de íconos disponibles en:{' '} + + https://icons.getbootstrap.com/ + +

+
+ + + Guardar +`} + > +
+
+ +
+
+ +
+
+ +
+
+
+ {/* PROPS */} -
-

⚙️ Props del componente

- +
+

⚙️ Props del componente

+
- - - + + + @@ -74,7 +124,7 @@ export default function Page() { string @@ -158,7 +208,7 @@ export default function Page() { ButtonHTMLAttributes<HTMLButtonElement> diff --git a/src/components/vista-componente.tsx b/src/components/vista-componente.tsx index 8a215ce..b8f75bf 100644 --- a/src/components/vista-componente.tsx +++ b/src/components/vista-componente.tsx @@ -1,6 +1,6 @@ -import { CodeBlock } from "./code-block"; -import Button from "./button"; -import { useState } from "react"; +import { CodeBlock } from './code-block'; +import Button from './button'; +import { useState } from 'react'; interface VistaComponenteProps { title: string; @@ -20,23 +20,23 @@ export default function VistaComponente({ const [showCode, setShowCode] = useState(false); return ( -
-

{title}

- {description &&

{description}

} +
+

{title}

+ {description &&

{description}

} -
+
{children} {code && ( -
+
{showCode && }
diff --git a/src/styles/sass/bootstrap.scss b/src/styles/sass/bootstrap.scss index 2da8cbe..e4cbffe 100644 --- a/src/styles/sass/bootstrap.scss +++ b/src/styles/sass/bootstrap.scss @@ -1,29 +1,29 @@ -@import "bootstrap/scss/functions"; +@import 'bootstrap/scss/functions'; -@import "variables"; +@import 'variables'; -@import "bootstrap/scss/variables"; -@import "bootstrap/scss/variables-dark"; +@import 'bootstrap/scss/variables'; +@import 'bootstrap/scss/variables-dark'; // Include any default map overrides here $azul: #003d79; $dorado: #d59f0f; $custom-colors: ( - "azul": $azul, - "dorado": $dorado, + 'azul': $azul, + 'dorado': $dorado, ); $theme-colors: map-merge($theme-colors, $custom-colors); -@import "bootstrap/scss/maps"; -@import "bootstrap/scss/mixins"; -@import "bootstrap/scss/bootstrap"; +@import 'bootstrap/scss/maps'; +@import 'bootstrap/scss/mixins'; +@import 'bootstrap/scss/bootstrap'; -@import "gradients"; -@import "extends"; -@import "table"; -@import "utilities"; +@import 'gradients'; +@import 'extends'; +@import 'table'; +@import 'utilities'; @import 'sidebar'; @import 'hover'; @import 'tabs'; @@ -33,7 +33,7 @@ $theme-colors: map-merge($theme-colors, $custom-colors); @include media-breakpoint-up(lg) { .bd-layout { display: grid; - grid-template-areas: "sidebar main"; + grid-template-areas: 'sidebar main'; grid-template-columns: 1fr 5fr; gap: $spacer * 1.5; } @@ -60,3 +60,6 @@ ul.list-unstyled li { } } +.btn-dorado { + color: $white !important; +}
PropTipoDescripciónPropTipoDescripción
- Clase base del botón. Ej: "primary",{" "} + Clase base del botón. Ej: "primary",{' '} "danger", etc.
- Soporta todas las props válidas de <button>{" "} + Soporta todas las props válidas de <button>{' '} nativo.