Skip to content

Commit

Permalink
Merge pull request #2780 from alex4200/master
Browse files Browse the repository at this point in the history
Updating documentation for widget 'Button'.
  • Loading branch information
jasongrout committed Feb 12, 2020
2 parents 1d8f7b0 + c22134c commit 4b485b1
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions docs/source/examples/Widget List.ipynb
Expand Up @@ -920,13 +920,22 @@
"metadata": {},
"outputs": [],
"source": [
"widgets.Button(\n",
"button = widgets.Button(\n",
" description='Click me',\n",
" disabled=False,\n",
" button_style='', # 'success', 'info', 'warning', 'danger' or ''\n",
" tooltip='Click me',\n",
" icon='check' # (FontAwesome names without the `fa-` prefix)\n",
")"
")\n",
"button"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The `icon` attribute can be used to define an icon; see the [fontawesome](https://fontawesome.com/icons) page for available icons. \n",
"A callback function `foo` can be registered using `button.on_click(foo)`. The function `foo` will be called when the button is clicked with the button instance as its single argument."
]
},
{
Expand Down Expand Up @@ -1389,7 +1398,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.6"
"version": "3.6.8"
}
},
"nbformat": 4,
Expand Down

0 comments on commit 4b485b1

Please sign in to comment.