time query by range | filter by type

This commit is contained in:
taDuc
2026-05-09 23:02:48 +07:00
parent a9b8c4ab8b
commit 6757eb2086
9 changed files with 172 additions and 15 deletions
+6 -10
View File
@@ -1,16 +1,11 @@
import React, { ReactNode } from "react";
interface ButtonProps {
children: ReactNode; // Button text or content
type ButtonProps = React.ButtonHTMLAttributes<HTMLButtonElement> & {
size?: "sm" | "md"; // Button size
variant?: "primary" | "outline"; // Button variant
startIcon?: ReactNode; // Icon before the text
endIcon?: ReactNode; // Icon after the text
onClick?: () => void; // Click handler
disabled?: boolean; // Disabled state
className?: string; // Disabled state
type?: "button" | "submit" | "reset";
}
};
const Button: React.FC<ButtonProps> = ({
children,
@@ -18,10 +13,10 @@ const Button: React.FC<ButtonProps> = ({
variant = "primary",
startIcon,
endIcon,
onClick,
className = "",
disabled = false,
type = "button",
type = "button",
...rest
}) => {
// Size Classes
const sizeClasses = {
@@ -44,8 +39,9 @@ const Button: React.FC<ButtonProps> = ({
} ${variantClasses[variant]} ${
disabled ? "cursor-not-allowed opacity-50" : ""
}`}
onClick={onClick}
disabled={disabled}
type={type}
{...rest}
>
{startIcon && <span className="flex items-center">{startIcon}</span>}
{children}