diff --git a/src/components/Insights/common/InsightCard/KeyValue/index.tsx b/src/components/Insights/common/InsightCard/KeyValue/index.tsx index 590d776db..fb4bb298e 100644 --- a/src/components/Insights/common/InsightCard/KeyValue/index.tsx +++ b/src/components/Insights/common/InsightCard/KeyValue/index.tsx @@ -1,11 +1,17 @@ +import { ForwardedRef, forwardRef } from "react"; import * as s from "./styles"; import { KeyValueProps } from "./types"; -export const KeyValue = (props: KeyValueProps) => { +const KeyValueComponent = ( + props: KeyValueProps, + ref: ForwardedRef +) => { return ( - + {props.label} {props.children} ); }; + +export const KeyValue = forwardRef(KeyValueComponent); diff --git a/src/components/Insights/common/InsightCard/KeyValue/types.ts b/src/components/Insights/common/InsightCard/KeyValue/types.ts index 76b1890e6..2903167c6 100644 --- a/src/components/Insights/common/InsightCard/KeyValue/types.ts +++ b/src/components/Insights/common/InsightCard/KeyValue/types.ts @@ -3,4 +3,5 @@ import { ReactNode } from "react"; export interface KeyValueProps { label: ReactNode; children: ReactNode; + className?: string; } diff --git a/src/components/Insights/common/InsightCard/index.tsx b/src/components/Insights/common/InsightCard/index.tsx index 31c12baee..319d6bb46 100644 --- a/src/components/Insights/common/InsightCard/index.tsx +++ b/src/components/Insights/common/InsightCard/index.tsx @@ -102,10 +102,10 @@ export const InsightCard = (props: InsightCardProps) => { tooltip: "Open Trace", button: (btnProps) => (