@_with_element
def button(self, element, label, key=None):
    "Display a button widget.\n\n        Parameters\n        ----------\n        label : str\n            A short label explaining to the user what this button is for.\n        key : str\n            An optional string to use as the unique key for the widget.\n            If this is omitted, a key will be generated for the widget\n            based on its content. Multiple widgets of the same type may\n            not share the same key.\n\n        Returns\n        -------\n        bool\n            If the button was clicked on the last run of the app.\n\n        Example\n        -------\n        >>> if st.button('Say hello'):\n        ...     st.write('Why hello there')\n        ... else:\n        ...     st.write('Goodbye')\n\n        "
    element.button.label = label
    element.button.default = False
    ui_value = _get_widget_ui_value('button', element, user_key=key)
    current_value = (ui_value if (ui_value is not None) else False)
    return current_value
Display a button widget.

Parameters
----------
label : str
    A short label explaining to the user what this button is for.
key : str
    An optional string to use as the unique key for the widget.
    If this is omitted, a key will be generated for the widget
    based on its content. Multiple widgets of the same type may
    not share the same key.

Returns
-------
bool
    If the button was clicked on the last run of the app.

Example
-------
>>> if st.button('Say hello'):
...     st.write('Why hello there')
... else:
...     st.write('Goodbye')
@_with_element
def button(self, element, label, key=None):
    "Display a button widget.\n\n        Parameters\n        ----------\n        label : str\n            A short label explaining to the user what this button is for.\n        key : str\n            An optional string to use as the unique key for the widget.\n            If this is omitted, a key will be generated for the widget\n            based on its content. Multiple widgets of the same type may\n            not share the same key.\n\n        Returns\n        -------\n        bool\n            If the button was clicked on the last run of the app.\n\n        Example\n        -------\n        >>> if st.button('Say hello'):\n        ...     st.write('Why hello there')\n        ... else:\n        ...     st.write('Goodbye')\n\n        "
    element.button.label = label
    element.button.default = False
    ui_value = _get_widget_ui_value('button', element, user_key=key)
    current_value = (ui_value if (ui_value is not None) else False)
    return current_value