Skip to content

Commit

Permalink
Update examples
Browse files Browse the repository at this point in the history
  • Loading branch information
Basssiiie committed Aug 12, 2022
1 parent 1945989 commit 601f383
Show file tree
Hide file tree
Showing 5 changed files with 183 additions and 202 deletions.
10 changes: 5 additions & 5 deletions examples/AllWidgets/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,21 @@ const allWidgets = window({
title: "All Widgets (fui example)",
width: 200, minWidth: 75, maxWidth: 10_000,
height: 350, minHeight: 75, maxHeight: 10_000,
padding: 5,
content: [
label({
text: "This is a label",
}),
box({
content: label({
text: "This is a boxed label"
text: "This is a label in a box "
})
}),
box({
text: "Boxed label",
text: "Label on top of a box",
content: label({
padding: [ "10px", "1w" ],
text: "This is a centred labeled boxed label"
width: "140px",
padding: { left: "1w" },
text: "This is a right aligned label"
})
}),
groupbox({
Expand Down
124 changes: 59 additions & 65 deletions examples/AllWidgets/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions examples/BirdStalker/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ const birdStalker = window({
text: "Duck-o-cam",
content: viewport({
target: compute(model.selectedDuck, duck => (duck) ? duck.id : null),
padding: 12,
})
}),
label({
Expand All @@ -71,7 +70,7 @@ const birdStalker = window({
items: compute(model.allDucks, v => v.map(d => `Duck #${d.id}`)),
selectedIndex: model.selectedDuckIndex,
disabled: compute(model.allDucks, v => v.length === 0),
disabledMessage: "No ducks detected",
disabledMessage: "Duck not found",
onChange: (index: number) => model.selectedDuckIndex.set(index)
}),
button({
Expand Down
Loading

0 comments on commit 601f383

Please sign in to comment.