Skip to content

Commit

Permalink
Remove defaultProps from TimelineRow.tsx (#2616)
Browse files Browse the repository at this point in the history
## Which problem is this PR solving?
- Part of #2596 

## Description of the changes
- 

## How was this change tested?
- 

## Checklist
- [ ] I have read
https://github.com/jaegertracing/jaeger/blob/master/CONTRIBUTING_GUIDELINES.md
- [ ] I have signed all commits
- [ ] I have added unit tests for the new functionality
- [ ] I have run lint and test steps successfully
  - for `jaeger`: `make lint test`
  - for `jaeger-ui`: `npm run lint` and `npm run test`

Signed-off-by: cs-308-2023 <[email protected]>
  • Loading branch information
ADI-ROXX authored Jan 25, 2025
1 parent 8f5814a commit c0f156b
Showing 1 changed file with 2 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,15 @@ interface ITimelineRowCellProps extends React.HTMLAttributes<HTMLDivElement> {
style?: object;
}

export default function TimelineRow(props: TTimelineRowProps) {
const { children, className = '', ...rest } = props;
export default function TimelineRow({ children, className = '', ...rest }: TTimelineRowProps) {
return (
<div className={`flex-row ${className}`} {...rest}>
{children}
</div>
);
}

TimelineRow.defaultProps = {
className: '',
};

function TimelineRowCell(props: ITimelineRowCellProps) {
const { children, className = '', width, style, ...rest } = props;
function TimelineRowCell({ children, className = '', width, style = {}, ...rest }: ITimelineRowCellProps) {
const widthPercent = `${width * 100}%`;
const mergedStyle = { ...style, flexBasis: widthPercent, maxWidth: widthPercent };
return (
Expand All @@ -52,6 +46,4 @@ function TimelineRowCell(props: ITimelineRowCellProps) {
);
}

TimelineRowCell.defaultProps = { className: '', style: {} };

TimelineRow.Cell = TimelineRowCell;

0 comments on commit c0f156b

Please sign in to comment.