Skip to content

Commit 7bfbb5e

Browse files
committed
fixup! scoped styles
1 parent be0c9cf commit 7bfbb5e

1 file changed

Lines changed: 9 additions & 12 deletions

File tree

src/openshift/components/CryostatContainer.tsx

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,10 @@ const NotificationGroup: React.FC = () => {
229229

230230
const ALL_NS = '#ALL_NS#';
231231

232+
/**
233+
* Container that provides service contexts and wraps content with .cryostat-app
234+
* for CSS scoping to prevent conflicts with OpenShift Console styles.
235+
*/
232236
const InstancedContainer: React.FC<{
233237
capabilities: Capabilities;
234238
service: CryostatService;
@@ -242,8 +246,10 @@ const InstancedContainer: React.FC<{
242246
<ServiceContext.Provider value={serviceContext}>
243247
<ChartContext.Provider value={chartContext}>
244248
<NotificationsContext.Provider value={NotificationsInstance}>
245-
<NotificationGroup />
246-
{children}
249+
<div className="cryostat-app">
250+
<NotificationGroup />
251+
{children}
252+
</div>
247253
</NotificationsContext.Provider>
248254
</ChartContext.Provider>
249255
</ServiceContext.Provider>
@@ -401,17 +407,8 @@ const NamespacedContainer: React.FC<{ searchNamespace: string; children: React.R
401407
);
402408
};
403409

404-
/**
405-
* Container component that wraps Cryostat UI content.
406-
* The 'cryostat-app' class scopes all Cryostat styles to prevent
407-
* conflicts with the OpenShift Console's global styles.
408-
*/
409410
export const CryostatContainer: React.FC = ({ children }) => {
410411
const [namespace] = useActiveNamespace();
411412
React.useEffect(() => checkNavHighlighting(), []);
412-
return (
413-
<div className="cryostat-app">
414-
<NamespacedContainer searchNamespace={namespace}>{children}</NamespacedContainer>
415-
</div>
416-
);
413+
return <NamespacedContainer searchNamespace={namespace}>{children}</NamespacedContainer>;
417414
};

0 commit comments

Comments
 (0)