Skip to content

Commit

Permalink
update tab docs to new content structure
Browse files Browse the repository at this point in the history
  • Loading branch information
kkoreilly committed Dec 24, 2024
1 parent a3dddf6 commit fd93f6d
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 12 deletions.
2 changes: 1 addition & 1 deletion docs/content/dialog.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ bt.OnClick(func(e events.Event) {
})
```

## Options
## Types

You can make a dialog that takes up the entire window:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
Cogent Core provides customizable tabs, which allow you to divide widgets into logical groups and give users the ability to freely navigate between them.
+++
Categories = ["Widgets"]
+++

**Tabs** allow you to divide [[widget]]s into logical groups and give users the ability to freely navigate between them.

## Properties

You can make tabs without any custom options:

Expand Down Expand Up @@ -28,7 +34,7 @@ ts.NewTab("Third")
ts.NewTab("Fourth")
```

You can add icons to tabs:
You can add [[icon]]s to tabs:

```Go
ts := core.NewTabs(b)
Expand All @@ -38,7 +44,17 @@ _, tb = ts.NewTab("Second")
tb.SetIcon(icons.Explore)
```

You can make functional tabs, which can be closed and moved:
You can allow users to add new tabs:

```Go
ts := core.NewTabs(b).SetNewTabButton(true)
ts.NewTab("First")
ts.NewTab("Second")
```

## Types

You can make functional tabs, which can be closed:

```Go
ts := core.NewTabs(b).SetType(core.FunctionalTabs)
Expand All @@ -58,11 +74,3 @@ tb.SetIcon(icons.Explore)
_, tb = ts.NewTab("Third")
tb.SetIcon(icons.History)
```

You can allow the user to add new tabs:

```Go
ts := core.NewTabs(b).SetNewTabButton(true)
ts.NewTab("First")
ts.NewTab("Second")
```

0 comments on commit fd93f6d

Please sign in to comment.