ui bug fixers

This commit is contained in:
2026-10-07 10:28:29 +05:30
committed by ImanThiyanga
parent 0d3f2fba14
commit 3abcfa6e6f
37 changed files with 1852 additions and 542 deletions
@@ -35,7 +35,8 @@ type Props = {
labels: string[]
datasets: Array<{
label?: string
data: number[]
/** `null` leaves an empty slot — used to pad the axis so a few bars sit at the start. */
data: (number | null)[]
backgroundColor?: string | string[]
}>
/** Container height in px — defaults to the original 260 so existing callers are unaffected. */
+15 -2
View File
@@ -4,7 +4,13 @@ import * as React from "react"
import { cn } from "@/lib/utils"
function Label({ className, ...props }: React.ComponentProps<"label">) {
/** `required` appends a red asterisk to mark a mandatory field. */
function Label({
className,
required,
children,
...props
}: React.ComponentProps<"label"> & { required?: boolean }) {
return (
<label
data-slot="label"
@@ -13,7 +19,14 @@ function Label({ className, ...props }: React.ComponentProps<"label">) {
className
)}
{...props}
/>
>
{children}
{required && (
<span aria-hidden="true" className="-ml-1 text-destructive">
*
</span>
)}
</label>
)
}