Skip to content

Commit

Permalink
big big problem
Browse files Browse the repository at this point in the history
  • Loading branch information
mrCherry97 committed Oct 6, 2023
1 parent 44bd0fd commit 0806c66
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 24 deletions.
42 changes: 20 additions & 22 deletions src/resources/Namespaces/MemoryQuotas.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import React from 'react';
import { FormItem, FormInput, FormLabel } from 'fundamental-react';
import * as jp from 'jsonpath';

import { Dropdown } from 'shared/components/Dropdown/Dropdown';
import { Input, FormItem } from '@ui5/webcomponents-react';

export function MemoryInput({
label,
Expand Down Expand Up @@ -32,27 +32,25 @@ export function MemoryInput({
};

return (
<FormItem>
<FormLabel required={required}>{label}</FormLabel>
<div className="memory-input">
<FormInput
compact
type="number"
min="0"
required={required}
value={numericValue}
step="any"
onChange={e => setValue(e.target.value + selectedUnit)}
{...otherProps}
/>
<Dropdown
options={options}
required={required}
selectedKey={selectedUnit}
onSelect={(_, { key }) => setValue(numericValue.toString() + key)}
{...otherProps}
/>
</div>
<FormItem label={label}>
{/* <FormLabel required={required}>{label}</FormLabel> */}
{/* <div className="memory-input"> */}
<Input
type="Number"
min="0"
required={required}
value={numericValue}
onInput={e => setValue(e.target.value + selectedUnit)}
{...otherProps}
/>
<Dropdown
options={options}
required={required}
selectedKey={selectedUnit}
onSelect={(_, { key }) => setValue(numericValue.toString() + key)}
{...otherProps}
/>
{/* </div> */}
</FormItem>
);
}
5 changes: 3 additions & 2 deletions src/shared/ResourceForm/components/ResourceForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import { KeyValueField, K8sNameField } from '../fields';
import * as jp from 'jsonpath';

import './ResourceForm.scss';
import { Form } from '@ui5/webcomponents-react';

export function ResourceForm({
pluralKind, // used for the request path
Expand Down Expand Up @@ -139,7 +140,7 @@ export function ResourceForm({
: editor;

return (
<section className={classnames('resource-form', className)}>
<Form className={classnames('resource-form', className)}>
{presetsSelector}
{onlyYaml ? null : (
<ModeSelector
Expand Down Expand Up @@ -225,6 +226,6 @@ export function ResourceForm({
</div>
)}
</form>
</section>
</Form>
);
}

0 comments on commit 0806c66

Please sign in to comment.