From ec80998b82f8253776ae1391bd81b2b258bed6a3 Mon Sep 17 00:00:00 2001 From: qishaoxuan Date: Thu, 28 Jul 2022 14:05:52 +0800 Subject: [PATCH] refactor: refactor input component, to support tab-index --- .../pendant-modify-panel/Email.tsx | 18 ------------------ .../pendant-modify-panel/Location.tsx | 18 ------------------ .../pendant-modify-panel/Phone.tsx | 18 ------------------ 3 files changed, 54 deletions(-) delete mode 100644 libs/components/editor-core/src/block-pendant/pendant-modify-panel/Email.tsx delete mode 100644 libs/components/editor-core/src/block-pendant/pendant-modify-panel/Location.tsx delete mode 100644 libs/components/editor-core/src/block-pendant/pendant-modify-panel/Phone.tsx diff --git a/libs/components/editor-core/src/block-pendant/pendant-modify-panel/Email.tsx b/libs/components/editor-core/src/block-pendant/pendant-modify-panel/Email.tsx deleted file mode 100644 index 92219a32e4..0000000000 --- a/libs/components/editor-core/src/block-pendant/pendant-modify-panel/Email.tsx +++ /dev/null @@ -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 ( - { - setText(e.target.value); - onValueChange(e.target.value); - }} - /> - ); -}; diff --git a/libs/components/editor-core/src/block-pendant/pendant-modify-panel/Location.tsx b/libs/components/editor-core/src/block-pendant/pendant-modify-panel/Location.tsx deleted file mode 100644 index 65ca9d3e6b..0000000000 --- a/libs/components/editor-core/src/block-pendant/pendant-modify-panel/Location.tsx +++ /dev/null @@ -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 ( - { - setText(e.target.value); - onValueChange(e.target.value); - }} - /> - ); -}; diff --git a/libs/components/editor-core/src/block-pendant/pendant-modify-panel/Phone.tsx b/libs/components/editor-core/src/block-pendant/pendant-modify-panel/Phone.tsx deleted file mode 100644 index 09241531d8..0000000000 --- a/libs/components/editor-core/src/block-pendant/pendant-modify-panel/Phone.tsx +++ /dev/null @@ -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 ( - { - setText(e.target.value); - onValueChange(e.target.value); - }} - /> - ); -};