Giter Site home page Giter Site logo

sweetalert's Introduction

Sweet Alert

Beautiful, responsive, customizable

and accessible popup replacement.

See SweetAlert documentation

Installation

pip install kivymd_extensions.sweetalert

Dependencies:

Documentation

See SweetAlert documentation.

Usage

from kivy.lang import Builder

from kivymd.app import MDApp

KV = """
#:import SweetAlert kivymd_extensions.sweetalert.SweetAlert


MDScreen:

    MDRaisedButton:
        text: "EXAMPLE"
        pos_hint: {"center_x": .5, "center_y": .5}
        on_release:
            SweetAlert(window_control_buttons="mac-style").fire("Any fool can use a computer!")
"""


class MainApp(MDApp):
    def build(self):
        return Builder.load_string(KV)


if __name__ == "__main__":
    MainApp().run()

Examples

git clone https://github.com/kivymd-extensions/sweetalert.git
cd sweetalert
cd examples/full_example
python main.py

Support

If you need assistance or you have a question, you can ask for help on our mailing list:

sweetalert's People

Contributors

artemsbulgakov avatar heattheatr avatar kulothunganug avatar ndonkohenri avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

sweetalert's Issues

not work with kivymd-1.1.0.dev0

Description of the Bug

I tried the example of the repository but it doesn't work

Versions

  • OS: Linux 5.4.0-125-generic #141-Ubuntu SMP
  • Python: 3.8
  • Kivy: 2.10
  • KivyMD: 1.1.0.dev0

Animations look uncorrectly on android.

Animations look uncorrectly on android. When you add any type to alert on android it looks uncorrectly.

kivy: 2.0.0
kivymd: master branch
sweetlaert: master branch

photo_2021-09-25_10-21-37

from kivymd.app import MDApp
from kivymd.uix.button import MDRaisedButton
from kivymd_extensions.sweetalert import SweetAlert


class Test(MDApp):
    def build(self):
        SweetAlert().fire(text="hello!", type="success")
        return MDRaisedButton(text="hello world")


Test().run()

Will this support new kivymd or is it dead

Description of the Feature

Your text

Code and Logs

from kivy.app import App
from kivy.lang import Builder

kv = """
Screen:
    # KV-Code
"""


class MainApp(App):
    def build(self):
        self.root = Builder.load_string(kv)


if __name__ == '__main__':
    MainApp().run()

Screenshots

Add images to explain us this feature. Paste urls here.

Remove this section if no images here

Versions

  • OS:
  • Python:
  • Kivy:
  • KivyMD:

Dynamic changes not working.

Description of the Bug

Dynamic changes are not working.

Code and Logs

from kivymd.app import MDApp
from kivy.lang import Builder
from kivymd_extensions.sweetalert import SweetAlert

KV = """
Screen:
	MDFlatButton:
		text: "open test 1"
		pos_hint: {"center_x": .5, "center_y": .6}
		on_release: app.alert.fire(text="test 1")
	MDFlatButton:
		text: "open test 2"
		pos_hint: {"center_x": .5, "center_y": .4}
		on_release: app.open_box()
"""


class Example(MDApp):
	def build(self):
		self.alert = SweetAlert()
		return Builder.load_string(KV)

	def open_box(self):
		self.alert.fire(text="test 2")


Example().run()

Versions

  • OS: Debian 10
  • Python: v3.9.0
  • Kivy: v2.0.0rc4
  • KivyMD: master

Creating multiple widgets

Description of the Bug

when using SweetAlert as already defined variable.
for first time it works correctly at the second time it doubles the widgets in the Dialog Box and keeps going.
this type of error also presits in Filemanager-Extension

Code and Logs

from kivy.lang import Builder
from kivymd_extensions.sweetalert import SweetAlert
from kivymd.app import MDApp

KV = """
MDScreen:

	MDRaisedButton:
		text: "EXAMPLE"
		pos_hint: {"center_x": .5, "center_y": .5}
		on_release:
			app.alert.fire("Any fool can use a computer!")
"""


class MainApp(MDApp):
	def build(self):
		self.alert = SweetAlert(window_control_buttons="mac-style")
		return Builder.load_string(KV)


if __name__ == "__main__":
	MainApp().run()

Versions

  • OS: Debian 10
  • Python: v3.9.0
  • Kivy: v2.0.0rc4
  • KivyMD: master

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.