Skip to content

Commit

Permalink
Cast to a specific type instead of any
Browse files Browse the repository at this point in the history
  • Loading branch information
eps1lon committed Apr 16, 2019
1 parent ad738d7 commit 48a727a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/src/pages/demos/breadcrumbs/CustomizedBreadcrumbs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ const StyledBreadcrumb = withStyles((theme: Theme) => ({
backgroundColor: emphasize(theme.palette.grey[300], 0.12),
},
},
}))((props: any) => <Chip {...props} />);
}))(Chip) as typeof Chip; // need the cast here because https://github.com/Microsoft/TypeScript/issues/26591

function handleClick(event: React.MouseEvent<HTMLDivElement, MouseEvent>) {
function handleClick(event: React.MouseEvent<Element, MouseEvent>) {
event.preventDefault();
alert('You clicked a breadcrumb.'); // eslint-disable-line no-alert
}
Expand All @@ -47,7 +47,7 @@ function CustomizedBreadcrumbs() {
return (
<Paper elevation={0} className={classes.root}>
<Breadcrumbs aria-label="Breadcrumb">
<StyledBreadcrumb
<Chip
component="a"
href="#"
label="Home"
Expand Down

0 comments on commit 48a727a

Please sign in to comment.