|
@@ -1,4 +1,5 @@
|
1
|
1
|
import { StatelessDropdownMenu } from '@atlaskit/dropdown-menu';
|
|
2
|
+import AKFieldText, { FieldText } from '@atlaskit/field-text';
|
2
|
3
|
import ExpandIcon from '@atlaskit/icon/glyph/expand';
|
3
|
4
|
import React, { Component } from 'react';
|
4
|
5
|
import { connect } from 'react-redux';
|
|
@@ -146,13 +147,14 @@ class DialOutNumbersForm extends Component {
|
146
|
147
|
<div className = 'form-control'>
|
147
|
148
|
{ this._createDropdownMenu(items) }
|
148
|
149
|
<div className = 'dial-out-input'>
|
149
|
|
- <input
|
|
150
|
+ <AKFieldText
|
150
|
151
|
autoFocus = { true }
|
151
|
|
- className = 'input-control'
|
|
152
|
+ isLabelHidden = { true }
|
|
153
|
+ label = { 'dial-out-input-field' }
|
152
|
154
|
onChange = { this._onInputChange }
|
153
|
155
|
placeholder = { t('dialOut.enterPhone') }
|
154
|
156
|
ref = { this._setDialInputElement }
|
155
|
|
- type = 'text' />
|
|
157
|
+ shouldFitContainer = { true } />
|
156
|
158
|
</div>
|
157
|
159
|
</div>
|
158
|
160
|
);
|
|
@@ -168,14 +170,16 @@ class DialOutNumbersForm extends Component {
|
168
|
170
|
const { code, dialCode } = this.state.selectedCountry;
|
169
|
171
|
|
170
|
172
|
return (
|
171
|
|
- <StatelessDropdownMenu
|
172
|
|
- isOpen = { this.state.isDropdownOpen }
|
173
|
|
- items = { [ { items } ] }
|
174
|
|
- onItemActivated = { this._onSelect }
|
175
|
|
- onOpenChange = { this._onOpenChange }
|
176
|
|
- shouldFitContainer = { true }>
|
177
|
|
- { this._createDropdownTrigger(dialCode, code) }
|
178
|
|
- </StatelessDropdownMenu>
|
|
173
|
+ <div className = 'dropdown-container'>
|
|
174
|
+ <StatelessDropdownMenu
|
|
175
|
+ isOpen = { this.state.isDropdownOpen }
|
|
176
|
+ items = { [ { items } ] }
|
|
177
|
+ onItemActivated = { this._onSelect }
|
|
178
|
+ onOpenChange = { this._onOpenChange }
|
|
179
|
+ shouldFitContainer = { false }>
|
|
180
|
+ { this._createDropdownTrigger(dialCode, code) }
|
|
181
|
+ </StatelessDropdownMenu>
|
|
182
|
+ </div>
|
179
|
183
|
);
|
180
|
184
|
}
|
181
|
185
|
|
|
@@ -195,9 +199,15 @@ class DialOutNumbersForm extends Component {
|
195
|
199
|
<CountryIcon
|
196
|
200
|
className = 'dial-out-flag-icon'
|
197
|
201
|
countryCode = { `${countryCode}` } />
|
198
|
|
- <input
|
|
202
|
+ { /**
|
|
203
|
+ * FIXME Replace FieldText with AtlasKit Button when an issue
|
|
204
|
+ * with icons shrinking due to button text is fixed.
|
|
205
|
+ */ }
|
|
206
|
+ <FieldText
|
199
|
207
|
className = 'input-control dial-out-code'
|
200
|
|
- readOnly = { true }
|
|
208
|
+ isLabelHidden = { true }
|
|
209
|
+ isReadOnly = { true }
|
|
210
|
+ label = 'dial-out-code'
|
201
|
211
|
type = 'text'
|
202
|
212
|
value = { dialCode || '' } />
|
203
|
213
|
<span className = 'dropdown-trigger-icon'>
|