mirror of
https://github.com/portainer/portainer.git
synced 2025-07-19 13:29:41 +02:00
feat(app): add ingress to app service form [EE-5569] (#9106)
This commit is contained in:
parent
8c16fbb8aa
commit
89c1d0e337
47 changed files with 1929 additions and 1181 deletions
|
@ -20,14 +20,22 @@ type RegularProps<
|
|||
Option = DefaultOption,
|
||||
IsMulti extends boolean = false,
|
||||
Group extends GroupBase<Option> = GroupBase<Option>
|
||||
> = { isCreatable?: false } & ReactSelectProps<Option, IsMulti, Group> &
|
||||
> = { isCreatable?: false; size?: 'sm' | 'md' } & ReactSelectProps<
|
||||
Option,
|
||||
IsMulti,
|
||||
Group
|
||||
> &
|
||||
RefAttributes<ReactSelectType<Option, IsMulti, Group>>;
|
||||
|
||||
type CreatableProps<
|
||||
Option = DefaultOption,
|
||||
IsMulti extends boolean = false,
|
||||
Group extends GroupBase<Option> = GroupBase<Option>
|
||||
> = { isCreatable: true } & ReactSelectCreatableProps<Option, IsMulti, Group>;
|
||||
> = { isCreatable: true; size?: 'sm' | 'md' } & ReactSelectCreatableProps<
|
||||
Option,
|
||||
IsMulti,
|
||||
Group
|
||||
>;
|
||||
|
||||
type Props<
|
||||
Option = DefaultOption,
|
||||
|
@ -41,12 +49,17 @@ export function Select<
|
|||
Option = DefaultOption,
|
||||
IsMulti extends boolean = false,
|
||||
Group extends GroupBase<Option> = GroupBase<Option>
|
||||
>({ className, isCreatable = false, ...props }: Props<Option, IsMulti, Group>) {
|
||||
>({
|
||||
className,
|
||||
isCreatable = false,
|
||||
size = 'md',
|
||||
...props
|
||||
}: Props<Option, IsMulti, Group>) {
|
||||
const Component = isCreatable ? ReactSelectCreatable : ReactSelect;
|
||||
|
||||
return (
|
||||
<Component
|
||||
className={clsx(className, 'portainer-selector-root')}
|
||||
className={clsx(className, 'portainer-selector-root', size)}
|
||||
classNamePrefix="portainer-selector"
|
||||
// eslint-disable-next-line react/jsx-props-no-spreading
|
||||
{...props}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue