-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
71 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
|
||
import Swal from 'sweetalert2/dist/sweetalert2.js'; | ||
|
||
// Default dark theme configuration | ||
export const defaultSwalConfig = { | ||
customClass: { | ||
popup: 'swal2-popup swal2-dark', | ||
confirmButton: 'swal2-confirm', | ||
cancelButton: 'swal2-cancel', | ||
htmlContainer: 'swal2-dark', | ||
title: 'swal2-dark' | ||
}, | ||
background: '#1a1a1a', | ||
color: '#ffffff' | ||
}; | ||
|
||
// Light theme configuration for optional use | ||
export const lightSwalConfig = { | ||
customClass: { | ||
popup: 'swal2-popup swal2-light', | ||
confirmButton: 'swal2-confirm', | ||
cancelButton: 'swal2-cancel' | ||
}, | ||
background: '#ffffff', | ||
color: '#000000' | ||
}; | ||
|
||
// Initialize Swal with default dark theme | ||
Swal.mixin(defaultSwalConfig); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,26 @@ | ||
.swal2-popup { | ||
background: #1a1a1a !important; | ||
color: #ffffff !important; | ||
box-shadow: 0 0 3px white !important; | ||
border: 1px solid #2d2d2d; | ||
} | ||
|
||
.swal2-confirm { | ||
background-color: red !important; | ||
background-color: #28a745 !important; | ||
border-color: red !important; | ||
} | ||
|
||
.swal2-dark { | ||
color: #ffffff !important; | ||
} | ||
|
||
.swal2-popup.swal2-light { | ||
background: #ffffff !important; | ||
color: #000000 !important; | ||
border: 1px solid #ddd; | ||
} | ||
|
||
.swal2-cancel { | ||
background-color: #dc3545 !important; | ||
color: #ffffff !important; | ||
} |