demo.jsx 1.49 KB
Newer Older
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
import React, {Component} from 'react';

import UserProfileNavigator from './index'

export default class DemoUserProfileNavigator extends Component {
    constructor(props) {
        super(props);
        this.gmeClient = new window.GME.classes.Client(window.GME.gmeConfig);
        this.gmeClient2 = new window.GME.classes.Client(window.GME.gmeConfig);

        this.gmeClient2.gmeConfig.authentication.enable = true;
    }

    render() {
        const userInfo = {
            _id: 'demo',
        };

        const userInfo2 = {
            _id: 'ALongNameToEnsureItIsCropped',
        };

        const userInfo3 = {
            _id: 'ALongNameShownInLargerWidget',
        };

        return (
            <div style={{width: '20%'}}>
                <div style={{width: '50%'}}>
                <UserProfileNavigator
                    gmeClient={this.gmeClient}
                    userInfo={userInfo}
                    color={'lightblue'}
                />
                </div>
                <div style={{width: '50%'}}>
                    <UserProfileNavigator
                        gmeClient={this.gmeClient2}
                        userInfo={userInfo2}
                    />
                </div>
                <div style={{width: '100%'}}>
                    <UserProfileNavigator
                        gmeClient={this.gmeClient2}
                        userInfo={userInfo3}
                        color={'grey'}
                    />
                </div>
            </div>
        )
    }
}