DatasetNavigator.tsx 1.52 KB
Newer Older
Maxym Borodenko's avatar
Maxym Borodenko committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import * as React from 'react';
import Grid from 'material-ui/Grid';

import StepNavigation from 'ui/common/stepper/StepNavigation';
import ProgressMenu from 'ui/common/stepper/progress-menu';
import Loading from 'ui/common/Loading';

function DatasetNavigator({children, location, stillLoading, steps, disabled, disabledNext, gotoStep, onDelete, onPublish}) {
    return (
        <Grid container spacing={ 0 }>
            <Grid item xs={ 12 } md={ 9 } xl={ 10 } className="back-gray p-20">
                <Grid container spacing={ 0 } className="back-white">
                    <StepNavigation disabled={ disabled } disabledNext={ disabledNext } onGotoStep={ gotoStep } onDelete={ onDelete } steps={ steps } location={ location } showStepName bottomDivider onPublish={ onPublish } />
                    <Grid item xs={ 12 }>
                        { stillLoading ? <Loading /> :
                            <div>
                                { children }
                            </div>
                        }
                    </Grid>
                    <StepNavigation disabled={ disabled } disabledNext={ disabledNext } onGotoStep={ gotoStep } onDelete={ onDelete } steps={ steps } location={ location } topDivider onPublish={ onPublish } />
                </Grid>
            </Grid>
            <Grid item xs={ 12 } md={ 3 } xl={ 2 }>
                <ProgressMenu disabled={ disabled } onGotoStep={ gotoStep } steps={ steps } location={ location } />
            </Grid>
        </Grid>
    );
}

export default DatasetNavigator;