Skip to content
This repository has been archived by the owner on Sep 26, 2022. It is now read-only.

Commit

Permalink
fix(SlideItem): integration with ItemGroup
Browse files Browse the repository at this point in the history
  • Loading branch information
TheComputerM committed Sep 15, 2020
1 parent c8ac4e6 commit cea27b3
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,20 @@
import Class from '../../internal/Class';
const click = getContext(SLIDE_GROUP);
const { select, values, inheritedActiveClass, index } = getContext(ITEM_GROUP);
const { select, register, _activeClass, index } = getContext(ITEM_GROUP);
let active;
let item;
let klass = '';
export { klass as class };
export let activeClass = inheritedActiveClass;
export let activeClass = _activeClass;
export let value = index();
export let disabled = null;
$: active = $values.includes(value);
register((values) => {
active = values.includes(value);
});
function selectItem({ target }) {
if (!disabled) {
Expand Down

0 comments on commit cea27b3

Please sign in to comment.