-
Notifications
You must be signed in to change notification settings - Fork 34
/
TitleBar.js
45 lines (39 loc) · 911 Bytes
/
TitleBar.js
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
import React from 'react';
import PropTypes from 'prop-types';
import { colors } from '@dhis2/ui-core';
import EditTitleBar from './EditTitleBar';
import ViewTitleBar from './ViewTitleBar';
import './TitleBar.css';
const style = {
title: {
position: 'relative',
fontSize: 21,
fontWeight: 500,
color: colors.black,
minWidth: 50,
},
description: {
fontSize: 14,
color: colors.grey800,
},
};
const TitleBar = ({ edit }) => {
return (
<div
className="titlebar-wrapper"
style={{
padding: '20px 15px 5px 10px',
}}
>
{edit ? (
<EditTitleBar style={style} />
) : (
<ViewTitleBar style={style} />
)}
</div>
);
};
TitleBar.propTypes = {
edit: PropTypes.bool,
};
export default TitleBar;