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.
46 lines
1007 B
TypeScript
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>
|
|
)
|
|
}
|