mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-17 03:01:25 +00:00
chore(tabs): pass id to anchor link in Tab
This commit is contained in:
parent
a0b6b561af
commit
121768598c
2 changed files with 6 additions and 2 deletions
|
@ -33,12 +33,16 @@
|
|||
const tabsById = derived(tabs, (_) =>
|
||||
_.reduce((a, c) => ({ ...a, [c.id]: c }), {})
|
||||
);
|
||||
|
||||
const selectedTab = writable(undefined);
|
||||
const content = writable([]);
|
||||
const contentById = derived(content, (_) =>
|
||||
_.reduce((a, c) => ({ ...a, [c.id]: c }), {})
|
||||
);
|
||||
const selectedContent = writable(undefined);
|
||||
|
||||
setContext("Tabs", {
|
||||
tabs,
|
||||
contentById,
|
||||
selectedTab,
|
||||
selectedContent,
|
||||
add: (data) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue