Skip to content

Commit

Permalink
chore: Adds background color to page and permutation containers (#2655)
Browse files Browse the repository at this point in the history
  • Loading branch information
orangevolon authored Sep 10, 2024
1 parent a78c2ff commit 7ddef11
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 1 deletion.
13 changes: 13 additions & 0 deletions pages/app/components/page-view.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
SPDX-License-Identifier: Apache-2.0
*/
@use '~design-tokens' as tokens;

/*
This sets a background color to the page's container
to reveal the effects of negative z-index.
*/
.page-container {
background-color: tokens.$color-background-container-content;
}
6 changes: 5 additions & 1 deletion pages/app/components/page-view.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import React, { lazy, Suspense } from 'react';
import pagesContext from '../pages-context';
import ErrorBoundary from './error-boundary';

import styles from './page-view.scss';

const pagesComponents: Record<string, ReturnType<typeof lazy>> = {};

export default function PageView({ pageId }: { pageId: string }) {
Expand All @@ -15,7 +17,9 @@ export default function PageView({ pageId }: { pageId: string }) {
return (
<ErrorBoundary key={pageId}>
<Suspense fallback={<span>Loading...</span>}>
<Page />
<div className={styles['page-container']}>
<Page />
</div>
</Suspense>
</ErrorBoundary>
);
Expand Down

0 comments on commit 7ddef11

Please sign in to comment.