Skip to content

Instantly share code, notes, and snippets.

@ioness
Created April 19, 2018 01:59
Show Gist options
  • Save ioness/08e6c7f0385b69e08df1a6eba5fe6bc1 to your computer and use it in GitHub Desktop.
Save ioness/08e6c7f0385b69e08df1a6eba5fe6bc1 to your computer and use it in GitHub Desktop.
import * as React from 'react'
import { Grid } from 'material-ui-next'
interface Props {
indexes: [ number ],
component: any
}
export default function List (props: Props): any {
const view: Array<any> = []
props.indexes.map((value: number, index: number): any => {
view.push(<props.component key={index} id={index.toString()}/>)
})
return <div>{view}</div>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment