Actualizar control de glucemias con eje Y secundario para correcciones e integracion de tienda

This commit is contained in:
2026-08-09 14:54:22 +00:00
parent 113bfe50ac
commit 3dae81645f
31 changed files with 4080 additions and 627 deletions
+4 -4
View File
@@ -42,14 +42,14 @@ function CommandDialog({
}) {
return (
<Dialog {...props}>
<DialogHeader className="sr-only">
<DialogTitle>{title}</DialogTitle>
<DialogDescription>{description}</DialogDescription>
</DialogHeader>
<DialogContent
className={cn("overflow-hidden p-0", className)}
showCloseButton={showCloseButton}
>
<DialogHeader className="sr-only">
<DialogTitle>{title}</DialogTitle>
<DialogDescription>{description}</DialogDescription>
</DialogHeader>
<Command className="[&_[cmdk-group-heading]]:text-muted-foreground **:data-[slot=command-input-wrapper]:h-12 [&_[cmdk-group-heading]]:px-2 [&_[cmdk-group-heading]]:font-medium [&_[cmdk-group]]:px-2 [&_[cmdk-group]:not([hidden])_~[cmdk-group]]:pt-0 [&_[cmdk-input-wrapper]_svg]:h-5 [&_[cmdk-input-wrapper]_svg]:w-5 [&_[cmdk-input]]:h-12 [&_[cmdk-item]]:px-2 [&_[cmdk-item]]:py-3 [&_[cmdk-item]_svg]:h-5 [&_[cmdk-item]_svg]:w-5">
{children}
</Command>
+30 -5
View File
@@ -1,3 +1,4 @@
import { useEffect, useState } from "react"
import {
CircleCheckIcon,
InfoIcon,
@@ -10,17 +11,41 @@ import { Toaster as Sonner, type ToasterProps } from "sonner"
const Toaster = ({ ...props }: ToasterProps) => {
const { theme = "system" } = useTheme()
const [isMobile, setIsMobile] = useState(false)
useEffect(() => {
const checkMobile = () => {
setIsMobile(window.innerWidth < 640)
}
checkMobile()
window.addEventListener("resize", checkMobile)
return () => window.removeEventListener("resize", checkMobile)
}, [])
const effectivePosition = isMobile ? "bottom-center" : (props.position || "top-right")
return (
<Sonner
theme={theme as ToasterProps["theme"]}
className="toaster group"
position={effectivePosition}
toastOptions={{
classNames: {
toast:
"group toast group-[.toaster]:bg-white dark:group-[.toaster]:bg-slate-900 group-[.toaster]:text-slate-900 dark:group-[.toaster]:text-slate-100 group-[.toaster]:border-slate-300 dark:group-[.toaster]:border-slate-700 group-[.toaster]:shadow-2xl opacity-100 bg-white dark:bg-slate-900 text-slate-900 dark:text-slate-100 border border-slate-300 dark:border-slate-700 shadow-2xl font-medium rounded-lg p-4",
description: "group-[.toast]:text-slate-600 dark:group-[.toast]:text-slate-400",
actionButton:
"group-[.toast]:bg-blue-600 group-[.toast]:text-white font-semibold",
cancelButton:
"group-[.toast]:bg-slate-200 group-[.toast]:text-slate-800 dark:group-[.toast]:bg-slate-800 dark:group-[.toast]:text-slate-200",
},
}}
icons={{
success: <CircleCheckIcon className="size-4" />,
info: <InfoIcon className="size-4" />,
warning: <TriangleAlertIcon className="size-4" />,
error: <OctagonXIcon className="size-4" />,
loading: <Loader2Icon className="size-4 animate-spin" />,
success: <CircleCheckIcon className="size-5 text-emerald-600 dark:text-emerald-400" />,
info: <InfoIcon className="size-5 text-blue-600 dark:text-blue-400" />,
warning: <TriangleAlertIcon className="size-5 text-amber-600 dark:text-amber-400" />,
error: <OctagonXIcon className="size-5 text-red-600 dark:text-red-400" />,
loading: <Loader2Icon className="size-5 animate-spin text-blue-600 dark:text-blue-400" />,
}}
style={
{