Button

Like the standard IPython button, but can contain more than just simple text.


In [1]:
from IPython.html import widgets
from ipbs.widgets import Button
import ipbs.bootstrap as bs

In [2]:
button = Button(description="Success", context=bs.Context.success)



In [3]:
button

In [4]:
from random import choice
@button.on_click
def recolor(btn):
    btn.context = choice(list(bs.Context))