mirror of
https://github.com/captbaritone/webamp.git
synced 2026-07-20 16:49:52 +00:00
Type passthrough props
This commit is contained in:
parent
49c50887d8
commit
082db5f3e2
1 changed files with 10 additions and 1 deletions
|
|
@ -11,7 +11,16 @@ export const characterClassName = (char: string | number) =>
|
|||
.toLowerCase()
|
||||
.charCodeAt(0)}`;
|
||||
|
||||
const Character = ({ children: char, className, ...passThrough }: Props) => (
|
||||
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>,
|
||||
HTMLSpanElement
|
||||
>) => (
|
||||
<span
|
||||
{...passThrough}
|
||||
className={`${className || ""} character ${characterClassName(char)}`}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue