-
Notifications
You must be signed in to change notification settings - Fork 12
/
ExpansionLabel.jsx
62 lines (60 loc) · 1.6 KB
/
ExpansionLabel.jsx
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
import React from 'react';
import {
AspectRatio as ExpansionIcon,
} from '@material-ui/icons';
import ReleasedChip from './ReleasedChip';
import RetiredChip from './RetiredChip';
import ProcessingChip from './ProcessingChip';
const SEPARATOR = '/'
const ExpansionLabel = props => {
return (
<div className='col-sm-12 no-side-padding'>
<span className='resource-label'>
<span style={{paddingTop: '5px'}}>
<ExpansionIcon fontSize='small' style={{width: '14px'}} />
</span>
{
props.owner &&
<React.Fragment>
<span>{props.owner}</span>
<span>{SEPARATOR}</span>
</React.Fragment>
}
{
props.short_code &&
<React.Fragment>
<span>{props.short_code}</span>
<span>{SEPARATOR}</span>
</React.Fragment>
}
{
props.version &&
<React.Fragment>
<span>{props.version}</span>
<span>{SEPARATOR}</span>
</React.Fragment>
}
<span className='resource-name' style={{marginTop: '-2px'}}>[{props.mnemonic}]</span>
</span>
{
props.released &&
<span style={{marginLeft: '10px'}}>
<ReleasedChip size='small' />
</span>
}
{
props.retired &&
<span style={{marginLeft: '10px'}}>
<RetiredChip size='small' />
</span>
}
{
props.is_processing &&
<span style={{marginLeft: '10px'}}>
<ProcessingChip size='small' />
</span>
}
</div>
)
}
export default ExpansionLabel;