import './space_cards.scss' ; import { EuiFlexGroup , EuiFlexItem } from '@elastic/eui' ; import React , { Component } from 'react' ; import type { Space } from '../../../common' ; import { SpaceCard } from './space_card' ; interface Props { spaces : Space [ ] ; serverBasePath : string ; } export class SpaceCards extends Component < Props , { } > { public render ( ) { return ( < div className = "spaceCards" > < EuiFlexGroup gutterSize = "l" justifyContent = "center" wrap responsive = { false } > { this . props . spaces . map ( this . renderSpace ) } < /EuiFlexGroup> < /div>); } private renderSpace = ( space ) => ( < EuiFlexItem key = { space . id } grow = { false } > < SpaceCard space = { space } serverBasePath = { this . props . serverBasePath } / > < /EuiFlexItem>); }