1
0
Fork 0
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:
Ali 2023-06-26 16:21:19 +12:00 committed by GitHub
parent 8c16fbb8aa
commit 89c1d0e337
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
47 changed files with 1929 additions and 1181 deletions

View file

@ -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>
);
}