Skip to content

Commit df00dde

Browse files
sophiewu2333embbnux
authored andcommitted
Current call control_keypad (#292)
* current call control_keypad * adjust ui * adjust indentation
1 parent 123f975 commit df00dde

File tree

3 files changed

+40
-27
lines changed

3 files changed

+40
-27
lines changed

src/components/ActiveCallDialPad/index.js

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@ class ActiveCallDialPad extends Component {
1919
this.state = {
2020
value: '',
2121
};
22-
this.onTextChange = (e) => {
23-
const value = e.currentTarget.value;
24-
const cleanValue = value.replace(cleanRegex, '');
25-
if (value !== cleanValue) {
26-
return;
27-
}
28-
this.setState({ value });
29-
};
22+
// this.onTextChange = (e) => {
23+
// const value = e.currentTarget.value;
24+
// const cleanValue = value.replace(cleanRegex, '');
25+
// if (value !== cleanValue) {
26+
// return;
27+
// }
28+
// this.setState({ value });
29+
// };
3030
this.onButtonOutput = (key) => {
3131
this.setState((preState) => {
3232
const value = preState.value + key;
@@ -39,11 +39,12 @@ class ActiveCallDialPad extends Component {
3939
render() {
4040
return (
4141
<div className={styles.root}>
42-
<TextInput
43-
className={styles.dialInput}
44-
value={this.state.value}
45-
onChange={this.onTextChange}
46-
/>
42+
<div className={styles.dialInput}>
43+
<input
44+
className={styles.input}
45+
value={this.state.value}
46+
/>
47+
</div>
4748
<DialPad
4849
className={styles.dialPad}
4950
onButtonOutput={this.onButtonOutput}

src/components/ActiveCallDialPad/styles.scss

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
@import '../../lib/commonStyles/colors';
12
.root {
2-
margin: 20px 10px 0 10px;
3+
margin: 44px 10px 0 10px;
34
}
45

56
.dialPad {
@@ -11,13 +12,21 @@
1112
box-sizing: content-box;
1213
border: 0px;
1314
margin-bottom: 5px;
14-
color: dimgrey;
1515
padding: 5px;
1616
input {
1717
box-sizing: content-box;
18-
font-size: 18px;
19-
text-align: left;
18+
text-align: center;
2019
padding: 0;
20+
outline: 0;
21+
height: 100%;
22+
width: 100%;
23+
background-color: transparent;
24+
border: none;
25+
font-size:15px;
26+
color: $lightblack;
27+
}
28+
.input::-ms-clear {
29+
display: none;
2130
}
2231
}
2332

src/components/ActiveCallPanel/index.js

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -141,18 +141,21 @@ class ActiveCallPanel extends Component {
141141
currentLocale={this.props.currentLocale}
142142
/>
143143
) : null;
144+
const backHeader = this.state.isShowKeyPad ? null : (
145+
<BackHeader
146+
onBackClick={this.props.onBackButtonClick}
147+
backButton={(
148+
<span className={styles.backButton}>
149+
<i className={classnames(dynamicsFont.arrow, styles.backIcon)} />
150+
<span className={styles.backLabel}>{this.props.backButtonLabel}</span>
151+
</span>
152+
)}
153+
buttons={[]}
154+
/>
155+
);
144156
return (
145157
<div className={styles.root}>
146-
<BackHeader
147-
onBackClick={this.props.onBackButtonClick}
148-
backButton={(
149-
<span className={styles.backButton}>
150-
<i className={classnames(dynamicsFont.arrow, styles.backIcon)} />
151-
<span className={styles.backLabel}>{this.props.backButtonLabel}</span>
152-
</span>
153-
)}
154-
buttons={[]}
155-
/>
158+
{backHeader}
156159
<Panel>
157160
{userInfo}
158161
{buttonsPad}

0 commit comments

Comments
 (0)