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

feat(docker/stacks): fold env vars by default [EE-5575] (#9957)

This commit is contained in:
Chaim Lev-Ari 2023-09-07 14:45:59 +01:00 committed by GitHub
parent 6a8ff7c076
commit ae3e612a24
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 28 additions and 17 deletions

View file

@ -9,6 +9,7 @@ interface Props {
title: ReactNode;
titleSize?: 'sm' | 'md' | 'lg';
isFoldable?: boolean;
defaultFolded?: boolean;
}
export function FormSection({
@ -16,8 +17,9 @@ export function FormSection({
titleSize = 'md',
children,
isFoldable = false,
defaultFolded = isFoldable,
}: PropsWithChildren<Props>) {
const [isExpanded, setIsExpanded] = useState(!isFoldable);
const [isExpanded, setIsExpanded] = useState(!defaultFolded);
return (
<>