mirror of
https://github.com/yaklang/yaklang-chrome-extension.git
synced 2026-09-26 21:21:53 +08:00
Update project structure and dependencies; add architecture documentation and improve build scripts. Introduce new versioning and permissions for enhanced functionality.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
import type { LabelHTMLAttributes, ReactNode } from 'react';
|
||||
import { cn } from '@/lib/cn';
|
||||
|
||||
export function Field({ label, hint, children, className, ...props }: {
|
||||
label: string;
|
||||
hint?: string;
|
||||
children: ReactNode;
|
||||
} & Omit<LabelHTMLAttributes<HTMLLabelElement>, 'children'>) {
|
||||
return (
|
||||
<label className={cn('ui-field', className)} {...props}>
|
||||
<span className="ui-field__label">{label}</span>
|
||||
{children}
|
||||
{hint && <small className="ui-field__hint">{hint}</small>}
|
||||
</label>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user