Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bootstrap 4 dark mode added #61

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions bootstrap-4-dark/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# @sweetalert2/theme-bootstrap-4-dark - Bootstrap 4 Dark Theme for [SweetAlert2](https://github.com/sweetalert2/sweetalert2)

[![npm version](https://img.shields.io/npm/v/@sweetalert2/theme-bootstrap-4-dark.svg)](https://www.npmjs.com/package/@sweetalert2/theme-bootstrap-4-dark)

Installation
------------

```sh
npm install --save sweetalert2 @sweetalert2/theme-bootstrap-4-dark
```

Usage
-----

With CSS:

```html
<!-- Include the Bootstrap 4 Dark theme -->
<link rel="stylesheet" href="@sweetalert2/theme-bootstrap-4-dark/bootstrap-4-dark.css">

<script src="sweetalert2/dist/sweetalert2.min.js"></script>
```

With SASS:

`your-app.js`:
```js
import Swal from 'sweetalert2/src/sweetalert2.js'
```

`your-app.scss`:
```scss
@import '~@sweetalert2/theme-bootstrap-4-dark/bootstrap-4-dark.scss';
```
49 changes: 49 additions & 0 deletions bootstrap-4-dark/_variables-dark.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@

$swal2-dark-theme-black: #19191a;
$swal2-dark-theme-white: #e1e1e1;
$swal2-outline-color: lighten($swal2-outline-color, 10%);

$swal2-background: $swal2-dark-theme-black;
$swal2-content-color: $swal2-dark-theme-white;
$swal2-title-color: $swal2-dark-theme-white;
$swal2-backdrop-theme: rgba($swal2-dark-theme-black, .75);

// // FOOTER
$swal2-footer-border-color: #555;
$swal2-footer-color: darken($swal2-content-color, 15%);

// // TIMER POGRESS BAR
$swal2-timer-progress-bar-background: rgba($swal2-dark-theme-white, .6);

// // INPUT
$swal2-input-color: $swal2-dark-theme-white;
$swal2-input-background: lighten($swal2-dark-theme-black, 10%);

// // VALIDATION MESSAGE
$swal2-validation-message-background: lighten($swal2-dark-theme-black, 10%);
$swal2-validation-message-color: $swal2-dark-theme-white;

// // QUEUE
$swal2-progress-step-background: lighten($swal2-dark-theme-black, 25%);

// // COMMON VARIABLES FOR CONFIRM AND CANCEL BUTTONS
$swal2-button-focus-box-shadow: 0 0 0 1px $swal2-background, 0 0 0 3px $swal2-outline-color;

// // TOAST
$swal2-toast-background: $swal2-dark-theme-black;
$swal2-toast-button-focus-box-shadow: 0 0 0 1px $swal2-background, 0 0 0 3px $swal2-outline-color;

// Input
$bootstrap-input-color: $swal2-input-color !default;
$bootstrap-input-bg: $swal2-input-background !default;

// Theme Variables
// Color
$bootstrap-primary: #375a7f !default;
$bootstrap-success: #00bc8c !default;
$bootstrap-danger: #e74c3c !default;
$bootstrap-warning: #f39c12 !default;
$bootstrap-info: #3498db !default;
$bootstrap-secondary: #444 !default;

//
8 changes: 8 additions & 0 deletions bootstrap-4-dark/bootstrap-4-dark.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@import '~sweetalert2/src/variables';
@import '../bootstrap-4/function';
@import './variables-dark';
@import '../bootstrap-4/variables';
@import '~sweetalert2/src/sweetalert2';
@import '../bootstrap-4/content.scss';

//
23 changes: 23 additions & 0 deletions bootstrap-4-dark/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"name": "@sweetalert2/theme-bootstrap-4-dark",
"version": "4.0.1",
"repository": "sweetalert2/sweetalert2-themes",
"homepage": "https://sweetalert2.github.io/",
"description": "Bootstrap 4 Dark theme for SweetAlert2",
"author": "",
"files": [
"*.css",
"*.scss"
],
"main": "bootstrap-4-dark.css",
"keywords": [
"sweetalert2",
"bootstrap-4-dark",
"theme",
"themes",
"theming",
"sass"
],
"bugs": "https://github.com/sweetalert2/sweetalert2-themes/issues",
"license": "MIT"
}
Loading