桌面应用(Tauri+React+SQLite):时间线/记录/学年学科成绩梯度/统计/类型与字段模板/附件内容寻址/详情视图/PWA 同步服务端(sync-server):多用户+邀请码/LWW推拉/seq游标/附件去重/Docker部署 多端同步地基:uuid v7/HLC混合逻辑时钟/软删除墓碑/sync_oplog,Node与Rust双端一致并通过自动化测试
17 lines
879 B
TypeScript
17 lines
879 B
TypeScript
import { forwardRef, type InputHTMLAttributes, type TextareaHTMLAttributes } from 'react';
|
|
import { cn } from '@/lib/utils';
|
|
|
|
const base = 'w-full rounded-md border border-line bg-surface px-2.5 text-[13px] text-ink-1 placeholder:text-ink-3 transition-colors hover:border-line-strong focus:border-brand focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed';
|
|
|
|
export const Input = forwardRef<HTMLInputElement, InputHTMLAttributes<HTMLInputElement>>(function Input(
|
|
{ className, ...props }, ref
|
|
) {
|
|
return <input ref={ref} className={cn(base, 'h-8', className)} {...props} />;
|
|
});
|
|
|
|
export const Textarea = forwardRef<HTMLTextAreaElement, TextareaHTMLAttributes<HTMLTextAreaElement>>(function Textarea(
|
|
{ className, ...props }, ref
|
|
) {
|
|
return <textarea ref={ref} className={cn(base, 'py-2 min-h-[72px] resize-y leading-relaxed', className)} {...props} />;
|
|
});
|