-
Notifications
You must be signed in to change notification settings - Fork 89
/
infoSettingsContent.jsx
89 lines (79 loc) · 2.77 KB
/
infoSettingsContent.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
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
// *********************************************************************
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License
// *********************************************************************
import React from 'react';
import PropTypes from 'prop-types';
import { TextField } from 'office-ui-fabric-react';
import { Colors, ScrollableContentPane, StatementBox } from 'datax-common';
export default class InfoSettingsContent extends React.Component {
constructor(props) {
super(props);
}
render() {
return (
<div style={rootStyle}>
<StatementBox icon="AsteriskSolid" statement="Basic info about your Flow." />
<ScrollableContentPane backgroundColor={Colors.neutralLighterAlt}>{this.renderContent()}</ScrollableContentPane>
</div>
);
}
renderContent() {
return (
<div style={contentStyle}>
<div style={sectionStyle}>
<TextField
className="ms-font-m info-settings-textbox"
spellCheck={false}
label="Name"
disabled={!this.props.flowNameTextboxEnabled}
value={this.props.displayName}
onChange={(event, displayName) => this.props.onUpdateDisplayName(displayName)}
/>
</div>
<div style={sectionStyle}>
<TextField
className="ms-font-m info-settings-textbox"
spellCheck={false}
label="Creator"
disabled={true}
value={this.props.owner}
/>
</div>
{this.props.name && (
<div style={sectionStyle}>
<TextField
className="ms-font-m info-settings-textbox"
spellCheck={false}
label="ID"
disabled={true}
value={this.props.name}
/>
</div>
)}
</div>
);
}
}
// Props
InfoSettingsContent.propTypes = {
displayName: PropTypes.string.isRequired,
name: PropTypes.string.isRequired,
owner: PropTypes.string.isRequired,
onUpdateDisplayName: PropTypes.func.isRequired,
flowNameTextboxEnabled: PropTypes.bool.isRequired
};
// Styles
const rootStyle = {
display: 'flex',
flexDirection: 'column',
overflowY: 'hidden'
};
const contentStyle = {
paddingLeft: 30,
paddingRight: 30,
paddingBottom: 30
};
const sectionStyle = {
paddingBottom: 15
};