mirror of
https://github.com/hanzoai/sign.git
synced 2026-10-21 01:21:51 +00:00
The dark page is 0%. Depth is the ramp above it: surfaces at 6-7%, menu hover at 16%, edges at 18%, all without hue. Fields, dialogs, sheets and toasts sit on the surface step so they read against the page.
29 lines
928 B
TypeScript
29 lines
928 B
TypeScript
import * as React from 'react';
|
|
|
|
import { cn } from '../lib/utils';
|
|
|
|
export type InputProps = React.InputHTMLAttributes<HTMLInputElement>;
|
|
|
|
const Input = React.forwardRef<HTMLInputElement, InputProps>(
|
|
({ className, type, ...props }, ref) => {
|
|
return (
|
|
<input
|
|
type={type}
|
|
className={cn(
|
|
'flex h-10 w-full rounded-md border border-input bg-card px-3 py-2 text-base ring-offset-background file:border-0 file:bg-transparent file:text-sm file:font-medium placeholder:text-muted-foreground/60 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50 md:text-sm',
|
|
className,
|
|
{
|
|
'ring-2 !ring-red-500 transition-all': props['aria-invalid'],
|
|
},
|
|
)}
|
|
ref={ref}
|
|
{...props}
|
|
/>
|
|
);
|
|
},
|
|
);
|
|
|
|
Input.displayName = 'Input';
|
|
|
|
export { Input };
|