Skip to content

Commit

Permalink
Merge pull request #292 from JuliaGizmos/pv/widget
Browse files Browse the repository at this point in the history
Update docs and bump dependencies
  • Loading branch information
Pietro Vertechi authored Feb 17, 2019
2 parents 74b0996 + 08437f1 commit b9505dc
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
4 changes: 2 additions & 2 deletions REQUIRE
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
julia 0.7
JSON 0.7
InteractBase 0.8.1
InteractBase 0.8.3
InteractBulma 0.4.0
WebIO 0.3.1
CSSUtil
Knockout
DataStructures 0.2.10
Widgets 0.4.1
Widgets 0.5.0
Reexport 0.1.0
Observables 0.2.2
17 changes: 15 additions & 2 deletions docs/src/custom_widgets.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,21 @@ Interact.@layout

## Defining custom widgets without depending on Interact

```@docs
Widgets.@nodeps
This is only relevant for package authors: it is not necessary to depend on Interact to define custom widgets. One can instead use the low-dependency package [Widgets](https://github.com/piever/Widgets.jl) that defines (but does not export) all the widgets. For example:

```julia
# in the package MyPackage defining the recipe:
using Widgets
function myrecipe(i)
label = "My recipe"
wdg = Widgets.dropdown(i)
Widget(["label" => label, "dropdown" => wdg])
end

# The user would then do:
using MyPackage, Interact

myrecipe(["a", "b", "c"])
```

## A simpler approach: the manipulate macro
Expand Down

0 comments on commit b9505dc

Please sign in to comment.