1
0
Fork 0
mirror of https://github.com/portainer/portainer.git synced 2025-07-22 23:09:41 +02:00

refactor(ui): migrate env var field to react [EE-4853] (#8451)

This commit is contained in:
Chaim Lev-Ari 2023-05-31 10:08:41 +07:00 committed by GitHub
parent 6b5940e00e
commit 2d05103fed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
40 changed files with 721 additions and 442 deletions

View file

@ -0,0 +1,28 @@
import { ComponentProps, InputHTMLAttributes } from 'react';
import { InputGroup } from '../InputGroup';
export function InputLabeled({
label,
className,
size,
id,
...props
}: {
label: string;
className?: string;
size?: ComponentProps<typeof InputGroup>['size'];
} & Omit<InputHTMLAttributes<HTMLInputElement>, 'size' | 'children'>) {
return (
<InputGroup className={className} size={size}>
<InputGroup.Addon as="label" htmlFor={id}>
{label}
</InputGroup.Addon>
<InputGroup.Input
// eslint-disable-next-line react/jsx-props-no-spreading
{...props}
id={id}
/>
</InputGroup>
);
}