blob: 68d5590a65481e2ebd2f0c204ce7429c40edb5d9 (
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
|
import PropTypes from 'prop-types';
// Copyright (c) 2016-present Mattermost, Inc. All Rights Reserved.
// See License.txt for license information.
import React from 'react';
export default class BackstageHeader extends React.Component {
static get propTypes() {
return {
children: PropTypes.node
};
}
render() {
const children = [];
React.Children.forEach(this.props.children, (child, index) => {
if (index !== 0) {
children.push(
<span
key={'divider' + index}
className='backstage-header__divider'
>
<i className='fa fa-angle-right'/>
</span>
);
}
children.push(child);
});
return (
<div className='backstage-header'>
<h1>
{children}
</h1>
</div>
);
}
}
|