parent
8fa4d3441e
commit
4aa42e680d
2 changed files with 33 additions and 0 deletions
@ -0,0 +1,27 @@ |
|||||||
|
import { FC, ReactElement, useMemo } from 'react'; |
||||||
|
|
||||||
|
import CommonUpsInputGroup from './CommonUpsInputGroup'; |
||||||
|
import Spinner from '../Spinner'; |
||||||
|
|
||||||
|
const EditUpsInputGroup: FC<EditUpsInputGroupProps> = ({ |
||||||
|
loading: isExternalLoading, |
||||||
|
previous, |
||||||
|
upsUUID, |
||||||
|
}) => { |
||||||
|
const content = useMemo<ReactElement>( |
||||||
|
() => |
||||||
|
isExternalLoading ? ( |
||||||
|
<Spinner /> |
||||||
|
) : ( |
||||||
|
<> |
||||||
|
<CommonUpsInputGroup previous={previous} /> |
||||||
|
<input hidden id="edit-ups-input-ups-uuid" readOnly value={upsUUID} /> |
||||||
|
</> |
||||||
|
), |
||||||
|
[isExternalLoading, previous, upsUUID], |
||||||
|
); |
||||||
|
|
||||||
|
return content; |
||||||
|
}; |
||||||
|
|
||||||
|
export default EditUpsInputGroup; |
@ -0,0 +1,6 @@ |
|||||||
|
type EditUpsInputGroupOptionalProps = { |
||||||
|
loading?: boolean; |
||||||
|
}; |
||||||
|
|
||||||
|
type EditUpsInputGroupProps = EditUpsInputGroupOptionalProps & |
||||||
|
Pick<CommonUpsInputGroupProps, 'previous'> & { upsUUID: string }; |
Loading…
Reference in new issue