refactor: refactor input component, to support tab-index

This commit is contained in:
qishaoxuan
2022-07-28 14:05:52 +08:00
parent d99649a9b6
commit ec80998b82
3 changed files with 0 additions and 54 deletions

View File

@@ -1,18 +0,0 @@
import React, { useState } from 'react';
import { Input } from '@toeverything/components/ui';
import { ModifyPanelContentProps } from './types';
export default ({ onValueChange, initialValue }: ModifyPanelContentProps) => {
const [text, setText] = useState(initialValue?.value || '');
return (
<Input
placeholder="Input email"
value={text}
onChange={e => {
setText(e.target.value);
onValueChange(e.target.value);
}}
/>
);
};

View File

@@ -1,18 +0,0 @@
import React, { useState } from 'react';
import { Input } from '@toeverything/components/ui';
import { ModifyPanelContentProps } from './types';
export default ({ onValueChange, initialValue }: ModifyPanelContentProps) => {
const [text, setText] = useState(initialValue?.value || '');
return (
<Input
placeholder="Input location"
value={text}
onChange={e => {
setText(e.target.value);
onValueChange(e.target.value);
}}
/>
);
};

View File

@@ -1,18 +0,0 @@
import React, { useState } from 'react';
import { Input } from '@toeverything/components/ui';
import { ModifyPanelContentProps } from './types';
export default ({ onValueChange, initialValue }: ModifyPanelContentProps) => {
const [text, setText] = useState(initialValue?.value || '');
return (
<Input
placeholder="Input phone"
value={text}
onChange={e => {
setText(e.target.value);
onValueChange(e.target.value);
}}
/>
);
};