Skip to content

Commit

Permalink
fix: children type (player)
Browse files Browse the repository at this point in the history
  • Loading branch information
Amir-Alipour committed May 18, 2023
1 parent 2fd83c6 commit 0cb36d8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "reaplay",
"version": "1.1.2",
"version": "1.1.3",
"description": "the react HOC for create custom players with any styles you like",
"author": "amir-alipour",
"license": "MIT",
Expand Down
5 changes: 3 additions & 2 deletions src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { useEffect, useLayoutEffect, useRef, useState } from 'react'
import { ReactNode, useEffect, useLayoutEffect, useRef, useState } from 'react'
import { ConvertTimeToText } from './helper'

interface Props {
tracks: string[]
startIndex?: number
children?: any
children?: ((props: PlayerType) => ReactNode) | ReactNode;
}
// prop types should be like this interface

Expand Down Expand Up @@ -447,6 +447,7 @@ export const Reaplay = ({ tracks, startIndex = 0, children }: Props) => {
playFast // play fast playbackRate of track
}

// @ts-ignore
return children({
...data
})
Expand Down

0 comments on commit 0cb36d8

Please sign in to comment.