refactor: refactor input component, to support tab-index

This commit is contained in:
qishaoxuan committed 2022-07-28 14:05:52 +08:00
1 parent d99649a9b6
commit ec80998b82
3 files changed
-54

No files matched your search

@@ -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);
}}
/>
);
};
@@ -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);
}}
/>
);
};
@@ -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);
}}
/>
);
};