Skip to content

Commit

Permalink
Merge pull request #28 from Pettor/bugfix/pwa-z-index
Browse files Browse the repository at this point in the history
fix: pwa z-index should always be at top
  • Loading branch information
Pettor authored Mar 5, 2024
2 parents d82ab62 + 8078a4b commit 13a6e29
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/components/library/pwa/PwaProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ export function PwaProvider({ children }: Props): ReactElement {
const { needRefresh, offlineReady, handleOfflineClose, handleRefresh } = usePwaProvider();

return (
<div className="z-20">
<>
<PwaUpdateDialog open={needRefresh} onUpdate={handleRefresh} />
<PwaOfflineDialog open={offlineReady} onClose={handleOfflineClose} />
{children}
</div>
</>
);
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export function PwaOfflineDialog({ open, onClose }: PwaOfflineDialogProps): Reac
return (
<>
{open && (
<div className="toast">
<div className="toast z-20">
<div className="alert alert-info shadow-lg">
<span>Ready to work offline</span>
<button className="btn btn-square btn-ghost btn-sm" onClick={onClose}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ export function PwaUpdateDialog({ open, onUpdate }: PwaUpdateDialogProps): React
return (
<>
{open && (
<div className="toast toast-center toast-bottom">
<div className="toast toast-center toast-bottom z-20">
<div className="alert alert-info shadow-lg">
<div className="flex flex-1 flex-row items-center gap-4">
<span>A new version is available</span>
Expand Down
8 changes: 4 additions & 4 deletions src/core/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ export function App(): ReactElement {
useDocumentTitle("Pixi Image Editor");

return (
<AppProviders>
<div className="flex h-svh w-svw">
<div className="flex h-svh w-svw">
<AppProviders>
<AppRoutes />
</div>
</AppProviders>
</AppProviders>
</div>
);
}

0 comments on commit 13a6e29

Please sign in to comment.