mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Search: Track user searches and results interactions (#52949)
This commit is contained in:
@@ -17,7 +17,7 @@ export interface Props extends Omit<CardContainerProps, 'disableEvents' | 'disab
|
||||
/** Link to redirect to on card click. If provided, the Card inner content will be rendered inside `a` */
|
||||
href?: string;
|
||||
/** On click handler for the Card */
|
||||
onClick?: () => void;
|
||||
onClick?: (e: React.MouseEvent<HTMLElement>) => void;
|
||||
/** @deprecated Use `Card.Heading` instead */
|
||||
heading?: ReactNode;
|
||||
/** @deprecated Use `Card.Description` instead */
|
||||
@@ -37,7 +37,7 @@ export interface CardInterface extends FC<Props> {
|
||||
|
||||
const CardContext = React.createContext<{
|
||||
href?: string;
|
||||
onClick?: () => void;
|
||||
onClick?: (e: React.MouseEvent<HTMLElement>) => void;
|
||||
disabled?: boolean;
|
||||
isSelected?: boolean;
|
||||
} | null>(null);
|
||||
@@ -93,7 +93,7 @@ const Heading = ({ children, className, 'aria-label': ariaLabel }: ChildProps &
|
||||
return (
|
||||
<h2 className={cx(styles.heading, className)}>
|
||||
{href ? (
|
||||
<a href={href} className={styles.linkHack} aria-label={ariaLabel}>
|
||||
<a href={href} className={styles.linkHack} aria-label={ariaLabel} onClick={onClick}>
|
||||
{children}
|
||||
</a>
|
||||
) : onClick ? (
|
||||
|
||||
Reference in New Issue
Block a user