mirror of
https://github.com/portainer/portainer.git
synced 2025-07-24 15:59: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
|
@ -1,22 +1,43 @@
|
|||
import clsx from 'clsx';
|
||||
import { PropsWithChildren } from 'react';
|
||||
|
||||
interface Props {
|
||||
htmlFor?: string;
|
||||
titleSize?: 'sm' | 'md' | 'lg';
|
||||
}
|
||||
|
||||
const tailwindTitleSize = {
|
||||
sm: 'text-sm',
|
||||
md: 'text-base',
|
||||
lg: 'text-lg',
|
||||
};
|
||||
|
||||
export function FormSectionTitle({
|
||||
children,
|
||||
htmlFor,
|
||||
titleSize = 'md',
|
||||
}: PropsWithChildren<Props>) {
|
||||
if (htmlFor) {
|
||||
return (
|
||||
<label
|
||||
htmlFor={htmlFor}
|
||||
className="col-sm-12 form-section-title flex cursor-pointer items-center"
|
||||
className={clsx(
|
||||
'col-sm-12 mt-1 mb-2 flex cursor-pointer items-center pl-0 font-medium',
|
||||
tailwindTitleSize[titleSize]
|
||||
)}
|
||||
>
|
||||
{children}
|
||||
</label>
|
||||
);
|
||||
}
|
||||
return <div className="col-sm-12 form-section-title">{children}</div>;
|
||||
return (
|
||||
<div
|
||||
className={clsx(
|
||||
'col-sm-12 mt-1 mb-2 pl-0 font-medium',
|
||||
tailwindTitleSize[titleSize]
|
||||
)}
|
||||
>
|
||||
{children}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue