Skip to content

Commit a9f44fe

Browse files
authored
fix: banner sizing on workspace (#267)
1 parent d467729 commit a9f44fe

File tree

5 files changed

+8
-4
lines changed

5 files changed

+8
-4
lines changed

src/components/ComponentsSelection/ComponentsSelectionContainer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,12 +69,12 @@ export const ComponentsSelectionContainer: React.FC<ComponentsSelectionProps> =
6969
}
7070

7171
if (error) {
72-
return <IllustratedError />;
72+
return <IllustratedError compact={true} />;
7373
}
7474

7575
// Defensive: If the API returned no items, show error
7676
if (!componentsList || componentsList.length === 0) {
77-
return <IllustratedError title={t('componentsSelection.cannotLoad')} />;
77+
return <IllustratedError title={t('componentsSelection.cannotLoad')} compact={true} />;
7878
}
7979

8080
return <ComponentsSelection componentsList={componentsList} setComponentsList={setComponentsList} />;

src/components/ControlPlane/FluxList.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ export default function FluxList() {
136136
<IllustratedError
137137
details={repoErr?.message || kustomizationErr?.message || t('FluxList.undefinedError')}
138138
title={t('FluxList.noFluxError')}
139+
compact={true}
139140
/>
140141
);
141142
}

src/components/ControlPlanes/List/ControlPlaneListWorkspaceGridTile.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ export function ControlPlaneListWorkspaceGridTile({ projectName, workspace }: Pr
5858
<IllustratedError
5959
title={t('ControlPlaneListWorkspaceGridTile.permissionErrorMessage')}
6060
details={t('ControlPlaneListWorkspaceGridTile.permissionErrorMessageSubtitle')}
61+
compact={true}
6162
/>
6263
);
6364
} else {

src/components/Shared/IllustratedError.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,18 @@ import IllustrationMessageType from '@ui5/webcomponents-fiori/dist/types/Illustr
66
interface Props {
77
title?: string;
88
details?: string;
9+
compact?: boolean;
910
}
1011

11-
export default function IllustratedError({ title, details }: Props) {
12+
export default function IllustratedError({ title, details, compact }: Props) {
1213
const { t } = useTranslation();
1314

1415
return (
1516
<IllustratedBanner
1617
illustrationName={IllustrationMessageType.SimpleError}
1718
title={title ?? t('IllustratedError.titleText')}
1819
subtitle={details ?? t('IllustratedError.subtitleText')}
20+
compact={compact}
1921
/>
2022
);
2123
}

src/components/Ui/IllustratedBanner/IllustratedBanner.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export const IllustratedBanner = ({
3636
return (
3737
<FlexBox direction="Column" alignItems="Center">
3838
<IllustratedMessage
39-
design={compact ? IllustrationMessageDesign.ExtraSmall : IllustrationMessageDesign.Large}
39+
design={compact ? IllustrationMessageDesign.Small : IllustrationMessageDesign.Large}
4040
name={illustrationName}
4141
titleText={title}
4242
subtitleText={subtitleText}

0 commit comments

Comments
 (0)