mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-01 06:36:38 +08:00
[优化] 更新域名列表输入组件,优化按钮样式并支持自定义容器类型
This commit is contained in:
@@ -14,6 +14,7 @@ interface ResourceFieldProps {
|
||||
error?: string;
|
||||
className?: string;
|
||||
tooltip?: string;
|
||||
container?: 'label' | 'div';
|
||||
children: ReactNode;
|
||||
}
|
||||
|
||||
@@ -36,10 +37,13 @@ export function ResourceField({
|
||||
error,
|
||||
className,
|
||||
tooltip,
|
||||
container = 'label',
|
||||
children,
|
||||
}: ResourceFieldProps) {
|
||||
const Container = container;
|
||||
|
||||
return (
|
||||
<label className={cn('block space-y-2', className)}>
|
||||
<Container className={cn('block space-y-2', className)}>
|
||||
<span className="flex items-center gap-2 text-sm font-medium text-[var(--foreground-primary)]">
|
||||
<span>{label}</span>
|
||||
{tooltip ? <FieldTooltip content={tooltip} /> : null}
|
||||
@@ -54,7 +58,7 @@ export function ResourceField({
|
||||
{hint}
|
||||
</span>
|
||||
) : null}
|
||||
</label>
|
||||
</Container>
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user