From 4aa42e680dffa7245874de5181371c3a6aa9acad Mon Sep 17 00:00:00 2001 From: Tsu-ba-me Date: Wed, 1 Mar 2023 16:07:36 -0500 Subject: [PATCH] feat(striker-ui): add EditUpsInputGroup --- .../ManageUps/EditUpsInputGroup.tsx | 27 +++++++++++++++++++ striker-ui/types/EditUpsInputGroup.d.ts | 6 +++++ 2 files changed, 33 insertions(+) create mode 100644 striker-ui/components/ManageUps/EditUpsInputGroup.tsx create mode 100644 striker-ui/types/EditUpsInputGroup.d.ts diff --git a/striker-ui/components/ManageUps/EditUpsInputGroup.tsx b/striker-ui/components/ManageUps/EditUpsInputGroup.tsx new file mode 100644 index 00000000..a9ab02f7 --- /dev/null +++ b/striker-ui/components/ManageUps/EditUpsInputGroup.tsx @@ -0,0 +1,27 @@ +import { FC, ReactElement, useMemo } from 'react'; + +import CommonUpsInputGroup from './CommonUpsInputGroup'; +import Spinner from '../Spinner'; + +const EditUpsInputGroup: FC = ({ + loading: isExternalLoading, + previous, + upsUUID, +}) => { + const content = useMemo( + () => + isExternalLoading ? ( + + ) : ( + <> + + + + ), + [isExternalLoading, previous, upsUUID], + ); + + return content; +}; + +export default EditUpsInputGroup; diff --git a/striker-ui/types/EditUpsInputGroup.d.ts b/striker-ui/types/EditUpsInputGroup.d.ts new file mode 100644 index 00000000..610b4ed8 --- /dev/null +++ b/striker-ui/types/EditUpsInputGroup.d.ts @@ -0,0 +1,6 @@ +type EditUpsInputGroupOptionalProps = { + loading?: boolean; +}; + +type EditUpsInputGroupProps = EditUpsInputGroupOptionalProps & + Pick & { upsUUID: string };