Created
April 19, 2018 02:08
-
-
Save ioness/2937f3c188ad40318f30800ee5c680ef to your computer and use it in GitHub Desktop.
List.tsx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as React from 'react' | |
interface Props { | |
indexes: [ number ], | |
component: any | |
} | |
export default function List (props: Props): any { | |
return props.indexes.map((index: number): any => { | |
return <props.component key={index} id={index.toString()}/> | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment