blob: 37b4be349f48b906d004032c84427f3daf6e3447 (
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
|
// Copyright (c) 2016 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: React.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'></i>
</span>
);
}
children.push(child);
});
return (
<div className='backstage-header'>
<h1>
{children}
</h1>
</div>
);
}
}
|