Skip to content

Commit

Permalink
fix: lint issues related to onClick
Browse files Browse the repository at this point in the history
Partially Resolves jaegertracing#2596

Signed-off-by: Abhishek <[email protected]>
  • Loading branch information
its-me-abhishek committed Jan 24, 2025
1 parent 25ac5de commit 95d5332
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@ import * as React from 'react';

import './TimelineRow.css';

export default function TimelineRow({ children, className = '', ...rest }: {
export default function TimelineRow({
children,
className = '',
...rest
}: {
children: React.ReactNode;
className?: string;
}) {
Expand All @@ -32,17 +36,19 @@ function TimelineRowCell({
className = '',
width,
style = {},
onClick,
...rest
}: {
children: React.ReactNode;
className?: string;
width: number;
style?: object;
onClick?: () => void;
}) {
const widthPercent = `${width * 100}%`;
const mergedStyle = { ...style, flexBasis: widthPercent, maxWidth: widthPercent };
return (
<div className={`ub-relative ${className}`} style={mergedStyle} {...rest}>
<div className={`ub-relative ${className}`} style={mergedStyle} onClick={onClick} {...rest}>
{children}
</div>
);
Expand Down

0 comments on commit 95d5332

Please sign in to comment.