aboutsummaryrefslogtreecommitdiffstats
path: root/openecomp-ui/src/sdc-app/Test.jsx
blob: dd45e39ecab285d29c9408564307014c7421c132 (plain)
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
import React from 'react';
import Tabs from 'react-bootstrap/lib/Tabs.js';
import Tab from 'react-bootstrap/lib/Tab.js';
import Button from 'react-bootstrap/lib/Button.js';
import ButtonGroup from 'react-bootstrap/lib/ButtonGroup.js';
import DropdownButton from 'react-bootstrap/lib/DropdownButton.js';
import MenuItem from 'react-bootstrap/lib/MenuItem.js';

import Modal from 'nfvo-components/modal/Modal.jsx';
import ValidationForm from 'nfvo-components/input/validation/ValidationForm.jsx';
import ValidationInput from 'nfvo-components/input/validation/ValidationInput.jsx';
import ToggleInput from 'nfvo-components/input/ToggleInput.jsx';

export default class Test extends React.Component {

	render() {
		return (
			<div>
				<Tabs defaultActiveKey={2}>
					<Tab eventKey={1} title='Tab 1'>Tab 1 content</Tab>
					<Tab eventKey={2} title='Tab 2'>Tab 2 content</Tab>
					<Tab eventKey={3} title='Tab 3' disabled>Tab 3 content</Tab>
				</Tabs>
				<div style={{marginTop: 20, marginBottom: 20}}></div>
				<Button>Default</Button>
				<span style={{marginLeft: 20}}></span>
				<Button bsStyle='primary'>Primary</Button>
				<span style={{marginLeft: 20}}></span>
				<Button bsStyle='success'>Success</Button>
				<span style={{marginLeft: 20}}></span>
				<Button bsStyle='info'>Info</Button>
				<span style={{marginLeft: 20}}></span>
				<Button bsStyle='warning'>Warning</Button>
				<span style={{marginLeft: 20}}></span>
				<Button bsStyle='danger'>Danger</Button>
				<span style={{marginLeft: 20}}></span>
				<Button bsStyle='link'>Link</Button>
				<div style={{marginTop: 20, marginBottom: 20}}></div>
				<ButtonGroup>
					<Button>Left</Button>
					<Button>Middle</Button>
					<Button>Right</Button>
				</ButtonGroup>
				<div style={{marginTop: 20, marginBottom: 20}}></div>
				<DropdownButton title='title' id='dropdown-basic'>
					<MenuItem eventKey='1'>Action</MenuItem>
					<MenuItem eventKey='2'>Another action</MenuItem>
					<MenuItem eventKey='3' active>Active Item</MenuItem>
					<MenuItem divider/>
					<MenuItem eventKey='4'>Separated link</MenuItem>
				</DropdownButton>

				<div style={{marginTop: 20, marginBottom: 20}}></div>
				<Modal show={false}>
					<Modal.Header closeButton>
						<Modal.Title>Modal title</Modal.Title>
					</Modal.Header>

					<Modal.Body>
						One fine body...
					</Modal.Body>

					<Modal.Footer>
						<Button>Close</Button>
						<Button bsStyle='primary'>Save changes</Button>
					</Modal.Footer>

				</Modal>

				<div style={{marginTop: 20, marginBottom: 20}}></div>

				<ValidationForm>
					<ValidationInput
						type='text'
						label='Required'
						placeholder='Enter text'
						validations={{required: true}}/>
					<ValidationInput
						type='text'
						label='Text'
						placeholder='Enter text'
						validations={{required: true, minLength:5}}/>
					<ValidationInput
						type='email'
						label='Email Address'
						placeholder='Enter email'
						validations={{required: true, email: true}}/>
					<ValidationInput type='password' label='Password'/>
					<ValidationInput type='file' label='File' help='[Optional] Block level help text'/>
					<ValidationInput type='checkbox' label='Checkbox2' name='ziv'/>
					<ValidationInput type='radio' label='Radio' name='zzz'/>
					<ValidationInput type='select' label='Select' placeholder='select'>
						<option value='select'>select</option>
						<option value='other'>...</option>
					</ValidationInput>
					<ValidationInput type='select' label='Multiple Select' multiple>
						<option value='select'>select (multiple)</option>
						<option value='other'>...</option>
					</ValidationInput>
					<ValidationInput type='textarea' label='Text Area' placeholder='textarea'/>
					<ToggleInput value={true}/>
					<ToggleInput />
					<ToggleInput label='ziv' value={true}/>
					<ToggleInput label='ziv'/>
				</ValidationForm>
			</div>
		);
	}

	doSomething(a) {
		if (a) {
			this.doSomething2();
		}
		else {
			return 1;
		}
	}

	doSomething2() {
		return 2;
	}
}