You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.3 KiB
59 lines
1.3 KiB
2 years ago
|
import { FC } from 'react';
|
||
|
|
||
|
import Grid from '../Grid';
|
||
|
import InputWithRef from '../InputWithRef';
|
||
|
import OutlinedInputWithLabel from '../OutlinedInputWithLabel';
|
||
|
|
||
|
const CommonUpsInputGroup: FC<CommonUpsInputGroupProps> = ({
|
||
|
previous: {
|
||
|
hostName: previousHostName,
|
||
|
ipAddress: previousIpAddress,
|
||
|
upsName: previousUpsName,
|
||
|
} = {},
|
||
|
}) => (
|
||
|
<>
|
||
|
<Grid
|
||
|
columns={{ xs: 1, sm: 2 }}
|
||
|
layout={{
|
||
|
'common-ups-input-cell-host-name': {
|
||
|
children: (
|
||
|
<InputWithRef
|
||
|
input={
|
||
|
<OutlinedInputWithLabel
|
||
|
id="common-ups-input-host-name"
|
||
|
label="Host name"
|
||
|
value={previousHostName}
|
||
|
/>
|
||
|
}
|
||
|
required
|
||
|
/>
|
||
|
),
|
||
|
},
|
||
|
'common-ups-input-cell-ip-address': {
|
||
|
children: (
|
||
|
<InputWithRef
|
||
|
input={
|
||
|
<OutlinedInputWithLabel
|
||
|
id="common-ups-input-ip-address"
|
||
|
label="IP address"
|
||
|
value={previousIpAddress}
|
||
|
/>
|
||
|
}
|
||
|
required
|
||
|
/>
|
||
|
),
|
||
|
},
|
||
|
}}
|
||
|
spacing="1em"
|
||
|
/>
|
||
|
<input
|
||
|
hidden
|
||
|
id="common-ups-input-ups-name"
|
||
|
readOnly
|
||
|
value={previousUpsName}
|
||
|
/>
|
||
|
</>
|
||
|
);
|
||
|
|
||
|
export default CommonUpsInputGroup;
|