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 };