From 1ddd2c0bf66db3eab87be0beccca639a20ee64fc Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Fri, 15 Feb 2019 07:24:43 -0800 Subject: [PATCH] Fix type for passthrough props --- js/components/Character.tsx | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/js/components/Character.tsx b/js/components/Character.tsx index 099c4282..17f6fadb 100644 --- a/js/components/Character.tsx +++ b/js/components/Character.tsx @@ -1,7 +1,7 @@ import React from "react"; import deburr from "lodash/deburr"; -interface Props { +interface Props extends React.HTMLAttributes { children: string | number; className?: string; } @@ -11,16 +11,7 @@ export const characterClassName = (char: string | number) => .toLowerCase() .charCodeAt(0)}`; -const Character = ({ - children: char, - className, - ...passThrough -}: Props & - // TODO: Seems like there should be a better way to do pass through props - React.DetailedHTMLProps< - React.HTMLAttributes, - HTMLSpanElement - >) => ( +const Character = ({ children: char, className, ...passThrough }: Props) => (