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:
parent
6a8ff7c076
commit
ae3e612a24
5 changed files with 28 additions and 17 deletions
|
@ -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 (
|
||||
<>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue