Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.
TypeScript analyticsaudience-segmentationchartscohort-analysisgoogle-analyticsproduct-analyticsstatisticsuser-journeyweb-analytics
import { Icon, type IconProps, Row, type RowProps, Text, type TextProps } from '@umami/react-zen';
import type { ReactNode } from 'react';
interface IconLabelProps extends RowProps {
icon: ReactNode;
label?: ReactNode;
weight?: TextProps['weight'];
iconProps?: Partial<IconProps>;
labelProps?: Partial<TextProps>;
}
export function IconLabel({
icon,
label,
weight,
iconProps,
labelProps,
children,
...props
}: IconLabelProps) {
return (
<Row alignItems="center" gap="2" {...props}>
<Icon {...iconProps}>{icon}</Icon>
{label && (
<Text weight={weight} {...labelProps}>
{label}
</Text>
)}
{children}
</Row>
);
}