AutosuggestInput: use UI input component
This commit is contained in:
parent
c2757f27c6
commit
61dd57ab81
2 changed files with 4 additions and 5 deletions
|
@ -6,6 +6,7 @@ import ImmutablePureComponent from 'react-immutable-pure-component';
|
||||||
|
|
||||||
import AutosuggestEmoji, { Emoji } from 'soapbox/components/autosuggest_emoji';
|
import AutosuggestEmoji, { Emoji } from 'soapbox/components/autosuggest_emoji';
|
||||||
import Icon from 'soapbox/components/icon';
|
import Icon from 'soapbox/components/icon';
|
||||||
|
import { Input } from 'soapbox/components/ui';
|
||||||
import AutosuggestAccount from 'soapbox/features/compose/components/autosuggest_account';
|
import AutosuggestAccount from 'soapbox/features/compose/components/autosuggest_account';
|
||||||
import { isRtl } from 'soapbox/rtl';
|
import { isRtl } from 'soapbox/rtl';
|
||||||
|
|
||||||
|
@ -298,11 +299,9 @@ export default class AutosuggestInput extends ImmutablePureComponent<IAutosugges
|
||||||
<div key='input' className='relative w-full'>
|
<div key='input' className='relative w-full'>
|
||||||
<label className='sr-only'>{placeholder}</label>
|
<label className='sr-only'>{placeholder}</label>
|
||||||
|
|
||||||
<input
|
<Input
|
||||||
type='text'
|
type='text'
|
||||||
className={classNames({
|
className={className}
|
||||||
'block w-full sm:text-sm border-gray-200 dark:border-gray-800 bg-gray-200 dark:bg-gray-800 text-gray-900 dark:text-white placeholder:text-gray-600 dark:placeholder:text-gray-600 focus:border-gray-200 dark:focus-border-gray-800 focus:ring-primary-500 focus:ring-2': true,
|
|
||||||
}, className)}
|
|
||||||
ref={this.setInput}
|
ref={this.setInput}
|
||||||
disabled={disabled}
|
disabled={disabled}
|
||||||
placeholder={placeholder}
|
placeholder={placeholder}
|
||||||
|
|
|
@ -11,7 +11,7 @@ const messages = defineMessages({
|
||||||
hidePassword: { id: 'input.password.hide_password', defaultMessage: 'Hide password' },
|
hidePassword: { id: 'input.password.hide_password', defaultMessage: 'Hide password' },
|
||||||
});
|
});
|
||||||
|
|
||||||
interface IInput extends Pick<React.InputHTMLAttributes<HTMLInputElement>, 'maxLength' | 'onChange' | 'onBlur' | 'type' | 'autoComplete' | 'autoCorrect' | 'autoCapitalize' | 'required' | 'disabled' | 'onClick' | 'readOnly' | 'min' | 'pattern'> {
|
interface IInput extends Pick<React.InputHTMLAttributes<HTMLInputElement>, 'maxLength' | 'onChange' | 'onBlur' | 'type' | 'autoComplete' | 'autoCorrect' | 'autoCapitalize' | 'required' | 'disabled' | 'onClick' | 'readOnly' | 'min' | 'pattern' | 'onKeyDown' | 'onKeyUp' | 'onFocus' | 'style' | 'id'> {
|
||||||
/** Put the cursor into the input on mount. */
|
/** Put the cursor into the input on mount. */
|
||||||
autoFocus?: boolean,
|
autoFocus?: boolean,
|
||||||
/** The initial text in the input. */
|
/** The initial text in the input. */
|
||||||
|
|
Loading…
Reference in a new issue