Update various components

This commit is contained in:
2026-02-26 21:03:21 -05:00
parent 637b3a0c34
commit 94f0f3ca13
20 changed files with 84 additions and 112 deletions

View File

@@ -1,4 +1,4 @@
import type { ButtonHTMLAttributes } from "react";
import type { ComponentProps } from "react";
export type ButtonRounding = "none" | "sm" | "md" | "lg" | "full";
@@ -7,7 +7,7 @@ export type ButtonSize = "xs" | "sm" | "md" | "lg" | "xl";
export type ButtonVariant = "standard" | "outline" | "ghost" | "outline-ghost" | "icon";
export interface ButtonProps extends Omit<ButtonHTMLAttributes<HTMLButtonElement>, "size" | "type"> {
export interface ButtonProps extends Omit<ComponentProps<"button">, "size" | "type"> {
type?: "button" | "submit" | "reset";
rounding?: ButtonRounding;
shape?: ButtonShape;

View File

@@ -1,5 +1,5 @@
import type React from "react";
import type { ChangeEventHandler, InputHTMLAttributes } from "react";
import type { ChangeEventHandler, ComponentProps } from "react";
export interface TextInputProps {
@@ -167,7 +167,7 @@ export interface RadioListProps {
}
export interface DateInputProps extends Omit<InputHTMLAttributes<HTMLInputElement>, "value" | "onChange" | "step">{
export interface DateInputProps extends Omit<ComponentProps<"input">, "value" | "onChange" | "step">{
step?: number;
value: Date | undefined;
onChange: (newValue: Date | undefined) => void;

View File

@@ -1,7 +1,7 @@
import type { HTMLProps } from "react";
import type { ComponentProps } from "react";
export interface MessageBlockProps extends HTMLProps<HTMLDivElement> {
export interface MessageBlockProps extends ComponentProps<"div"> {
outline?: "none" | "sm" | "md" | "lg";
rounded?: "none" | "xs" | "sm" | "md" | "lg" | "xl";
}

View File

@@ -1,18 +1,21 @@
import type { ComponentProps } from "react";
export type ModalBackgroundType = "darken" | "lighten" | "blur" | "darken-blur" | "lighten-blur" | "darken-blur-radial" | "lighten-blur-radial" | "transparent" | "none";
export interface ModalHeaderProps {
export interface ModalHeaderProps extends ComponentProps<"div"> {
onClose?: () => void;
className?: string;
children: React.ReactNode;
}
export interface ModalFooterProps {
export interface ModalFooterProps extends ComponentProps<"div"> {
className?: string;
children: React.ReactNode;
}
export interface ModalBodyProps {
export interface ModalBodyProps extends ComponentProps<"div"> {
className?: string;
children: React.ReactNode;
}

View File

@@ -1,3 +1,6 @@
import type { ComponentProps } from "react";
export type Align = "start" | "end";
export type Placement = "top" | "bottom" | "left" | "right";
export type AnchorTo = `${Placement}` | `${Placement} ${Align}`;
@@ -9,7 +12,7 @@ export interface PopoverMenuProps {
children: React.ReactNode;
}
export interface NavBarProps {
export interface NavBarProps extends ComponentProps<"nav"> {
className?: string;
children: React.ReactNode;
}