Skip to content

Upgrade KoliBri components and add docs for tabs create button #339

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 17 additions & 5 deletions docs/30-components/tabs.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@ Die Zuordnung der Daten im Attribut **`_tabs`** zu den Div-Elementen erfolgt aut

Zur Behandlung von Events bzw. Callbacks siehe <kol-link _label="Events" _href="../concepts/events" />.

| Event | Auslöser | Value |
|----------|----------------------|----------------------------|
| `select` | Tab wurde ausgewählt | Index des ausgewählten Tab |
| Event | Auslöser | Value |
|----------|--------------------------------|----------------------------|
| `select` | Tab wurde ausgewählt | Index des ausgewählten Tab |
| `create` | Create-Button wurde angeklickt | - |

### Beispiel

Expand All @@ -65,9 +66,20 @@ Die Daten für die Registerkarten können als Objekte oder JSON-String an das At

Um eine Registerkarte zu deaktivieren, verwenden Sie das Attribut **`_disabled`**.

### Close-Icon im Registekartenheader
### Create-Button

Wenn Sie eine schließbare Registerkarte benötigen, können Sie dies über das Attribut **`_on`** und den Wert **"onClose":true** realisieren.
Mit dem Attribut **`_has-create-button`** lässt sich ein zusätzlicher Button in der Tab-Navigation aktivieren. Dieser Button erscheint am Ende der Tab-Leiste und ermöglicht es Usern, neue Tabs dynamisch hinzuzufügen.

#### Code

```html
<kol-tabs _tabs='[{"_label":"Tab 1"},{"_label":"Tab 2"}]' _has-create-button>
<div>Inhalt von Tab 1</div>
<div>Inhalt von Tab 2</div>
</kol-tabs>
```

<kol-link _href="https://develop--kolibri-public-ui.netlify.app/#/tabs/create-button" _target="_blank" _label="Beispiel in der Sample App"></kol-link>

### Best practices

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@leanup/form": "1.3.54",
"@mdx-js/react": "3.1.0",
"@monaco-editor/react": "4.7.0",
"@public-ui/components": "3.0.0-rc.7",
"@public-ui/components": "3.0.1",
"@public-ui/react": "3.0.0-rc.7",
"@public-ui/theme-default": "3.0.0-rc.7",
"classnames": "2.5.1",
Expand Down
70 changes: 49 additions & 21 deletions pnpm-lock.yaml

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

Loading