Files
EvoBGP/apps/web/src/components/settings/settings-setting-field.tsx
T
Denozordec 44f70443c3
CI / changes (push) Successful in 8s
CI / commitlint (push) Skipped
CI / go (push) Skipped
CI / bird2 (push) Skipped
CI / openapi (push) Successful in 53s
CI / web (push) Successful in 1m16s
CI / release (push) Successful in 4m24s
refactor(web): improve layout and responsiveness of settings components
Enhanced various settings components by adding 'min-w-0' class for better overflow handling and adjusting flex properties for improved alignment. Updated card and grid structures to ensure a cohesive user experience across the settings interface. Refined descriptions and layout in several settings tabs for better clarity and usability.
2026-08-18 01:19:42 +07:00

46 lines
1007 B
TypeScript

import { type ComponentProps, type ReactNode } from 'react'
import { Badge } from '@/components/reui/badge'
import { SettingRow } from '@/components/settings/setting-row'
/** Tenant settings row — same SettingRow DNA as UI settings. */
export function SettingsSettingField({
title,
description,
badge,
children,
last,
labelFor,
contentClassName,
stacked,
}: {
title: string
description?: ReactNode
badge?: { label: string; variant: ComponentProps<typeof Badge>['variant'] }
children: ReactNode
last?: boolean
labelFor?: string
contentClassName?: string
stacked?: boolean
}) {
return (
<SettingRow
title={title}
description={description}
last={last}
labelFor={labelFor}
contentClassName={contentClassName}
stacked={stacked}
titleAddon={
badge ? (
<Badge variant={badge.variant} size="sm">
{badge.label}
</Badge>
) : null
}
>
{children}
</SettingRow>
)
}