From 66d5d28b03aa5de7e51ab03561220f475f6f83fd Mon Sep 17 00:00:00 2001 From: Maksym Portianoi Date: Mon, 8 Jan 2024 15:59:44 -0500 Subject: [PATCH] feat(ktabs): reskin component [KHCP-9003] (#1914) * feat(ktabs): reskin component [KHCP-9003] * docs(ktabs): update component docs [KHCP-9003] * fix(ktabs): text colors [KHCP-9003] * fix(ktabs): use anchor tag for tab link [KHCP-9003] * fix(ktabs): minor styling tweak [KHCP-9003] * fix(ktabs): add transition property [KHCP-9003] * fix(ktabs): address PR feedback Co-authored-by: Adam DeHaven <2229946+adamdehaven@users.noreply.github.com> * fix(ktabs): address PR feedback [KHCP-9003] * fix: minor fix [KHCP-9003] * fix(ktabs): address PR feedback [KHCP-9003] * fix(sandbox): fix router example [KHCP-9003] * docs: minor update [KHCP-9003] * fix(ktabs): address PR feedback [KHCP-9003] * fix(ktabs): address PR feedback [KHCP-9003] * fix(ktabs): add overflow x [KHCP-9003] --------- Co-authored-by: Adam DeHaven <2229946+adamdehaven@users.noreply.github.com> --- cli/template/docs/Template.md | 2 +- docs/components/tabs.md | 401 ++++++++++++--------------- docs/guide/migrating-to-version-9.md | 7 + sandbox/pages/SandboxTabs.vue | 207 ++++++++++---- src/components/KTabs/KTabs.cy.ts | 8 +- src/components/KTabs/KTabs.vue | 107 ++++--- src/types/tabs.ts | 1 + 7 files changed, 415 insertions(+), 318 deletions(-) diff --git a/cli/template/docs/Template.md b/cli/template/docs/Template.md index 1b11a1edcb..ce02e10236 100644 --- a/cli/template/docs/Template.md +++ b/cli/template/docs/Template.md @@ -43,7 +43,7 @@ Actual component using examplePropName ## Events -- `@changed` - Emitted when... +- `@change` - Emitted when... ``` ## Props ### tabs -`KTabs` has one **required** prop, `tabs`, which is an array of tab objects with the following interface: +Required prop, which is an array of tab objects with the following interface: ```ts -export interface Tab { - hash: string +interface Tab { + hash: string // has to be unique, corresponds to the panel slot name title: string + disabled?: boolean } ``` -```html - - - -``` - -### v-model - -By default the `KTabs` will set the first tab in the array as active. You can override this by passing in the hash of any other tab to be used with `v-model`. - - -