mirror of
https://github.com/lone-cloud/gerbil
synced 2026-06-04 04:04:44 -07:00
23 lines
531 B
TypeScript
23 lines
531 B
TypeScript
import { Group, Text } from '@mantine/core';
|
|
import { InfoTooltip } from '@/components/InfoTooltip';
|
|
|
|
interface LabelWithTooltipProps {
|
|
label: string;
|
|
tooltip?: string;
|
|
fontWeight?: number;
|
|
marginBottom?: string;
|
|
}
|
|
|
|
export const LabelWithTooltip = ({
|
|
label,
|
|
tooltip,
|
|
fontWeight = 500,
|
|
marginBottom = 'xs',
|
|
}: LabelWithTooltipProps) => (
|
|
<Group gap="xs" align="center" mb={marginBottom}>
|
|
<Text size="sm" fw={fontWeight}>
|
|
{label}
|
|
</Text>
|
|
{tooltip && <InfoTooltip label={tooltip} />}
|
|
</Group>
|
|
);
|