import { Image } from '@neo-one/react-common' ; import * as React from 'react' ; import { Five } from './Five' ; import { Four } from './Four' ; import { One } from './One' ; import { Three } from './Three' ; import { Two } from './Two' ; const numbers = [ One , Two , Three , Four , Five ] ; interface Props { readonly num : number ; } export const Num = ( { num , ... rest } ) => { const Component = numbers [ num ] ; return < Component { ... rest } / > ; } ;