chore: complete first pass of apply jsdoc annotations to component props

This commit is contained in:
Eric Liu 2020-07-26 17:42:12 -07:00
commit f30755b237
97 changed files with 2327 additions and 259 deletions

View file

@ -13,7 +13,7 @@
let dropdownHidden = true;
let tabs = writable([]);
let tabsById = derived(tabs, _ =>
let tabsById = derived(tabs, (_) =>
_.reduce((a, c) => ({ ...a, [c.id]: c }), {})
);
let currentIndex = selected;
@ -24,16 +24,16 @@
setContext("Tabs", {
selectedTab,
selectedContent,
add: data => {
tabs.update(_ => [..._, { ...data, index: _.length }]);
add: (data) => {
tabs.update((_) => [..._, { ...data, index: _.length }]);
},
addContent: data => {
content.update(_ => [..._, { ...data, index: _.length }]);
addContent: (data) => {
content.update((_) => [..._, { ...data, index: _.length }]);
},
update: id => {
update: (id) => {
currentIndex = $tabsById[id].index;
},
change: direction => {
change: (direction) => {
let index = currentIndex + direction;
if (index < 0) {
@ -57,7 +57,7 @@
}
currentIndex = index;
}
},
});
afterUpdate(() => {