项目作者: sweetalert2

项目描述 :
Themes for SweetAlert2: Dark, Minimal, Borderless, Bootstrap, Material UI, WordPress Admin, Bulma, ...
高级语言: SCSS
项目地址: git://github.com/sweetalert2/sweetalert2-themes.git
创建时间: 2018-02-17T11:12:39Z
项目社区:https://github.com/sweetalert2/sweetalert2-themes

开源协议:MIT License

下载


@sweetalert2/themes - Official Themes for SweetAlert2

@sweetalert2/themes"">npm version
semantic-release

Available themes

Installation

You can install all themes at once:

  1. npm install --save @sweetalert2/themes

Or just a single theme @sweetalert2/theme-<theme_name>, e.g.

  1. npm install --save @sweetalert2/theme-dark

Or grab them both from @sweetalert2/themes">jsdelivr CDN, for example:

  1. <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@sweetalert2/theme-dark@5/dark.css" />
  2. <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11/dist/sweetalert2.min.js"></script>

Usage

With CSS:

  1. <!-- Include a required theme -->
  2. <link rel="stylesheet" href="@sweetalert2/themes/dark/dark.css" />
  3. <script src="sweetalert2/dist/sweetalert2.min.js"></script>

With SASS:

your-app.js:

  1. import Swal from 'sweetalert2/dist/sweetalert2.js';

your-app.scss:

  1. @import '@sweetalert2/themes/dark/dark.scss';

Contributing

If you would like to contribute enhancements or fixes, please do the following:

  1. Fork the sweetalert2-themes repository and clone it locally.

  2. When in the sweetalert2-themes directory, run yarn install to install dependencies.

  3. To begin active development, run yarn start and yarn watch simultaneously.

  4. Or, if you want to quickly start a new theme, run yarn create-new-theme my-awesome-theme. This will create the theme’s default files.

Donations

Has SweetAlert2 helped you create an amazing application? You can show your support by making a donation:

Hall of Donators :trophy: