Skip to content

Commit

Permalink
fix: comment out useArgs for future implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
ImCoolNowRight committed Sep 13, 2024
1 parent 8aab429 commit b735568
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 30 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ import lng from '@lightningjs/core';
import { default as ListItemSliderComponent } from './ListItemSlider';
import { createModeControl, generateSubStory } from '../../docs/utils';
import { Basic as SliderStory } from '../Slider/Slider.stories';
import { useArgs } from '@storybook/manager-api';
// TODO: Re-implement after figuring out how to in Storybook 8; worked in 7.
// import { useArgs } from '@storybook/manager-api';

/**
* A ListItem component with slider functionality
Expand All @@ -31,23 +32,23 @@ export default {
};

export const ListItemSlider = () => {
const [{ value }, updateArgs] = useArgs();
// const [{ value }, updateArgs] = useArgs();
return class ListItemSlider extends lng.Component {
static _template() {
return {
ListItemSlider: {
type: ListItemSliderComponent,
value: value,
signals: {
onSliderChange: true
}
type: ListItemSliderComponent
// value: value,
// signals: {
// onSliderChange: true
// }
}
};
}
// update arg control when value changes
onSliderChange(value) {
updateArgs({ value });
}
// onSliderChange(value) {
// updateArgs({ value });
// }
};
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,31 @@ import lng from '@lightningjs/core';
import { createModeControl } from '../../docs/utils';
import TextBox from '../TextBox';
import Slider from '.';
import { useArgs } from '@storybook/manager-api';
// TODO: Re-implement after figuring out how to in Storybook 8; worked in 7.
// import { useArgs } from '@storybook/manager-api';

export default {
title: 'Components/Slider/Slider'
};

export const Basic = () => {
const [{ value }, updateArgs] = useArgs();
// const [{ value }, updateArgs] = useArgs();
return class Basic extends lng.Component {
static _template() {
return {
Slider: {
type: Slider,
value: value,
signals: {
onChange: true
}
type: Slider
// value: value,
// signals: {
// onChange: true
// }
}
};
}
// update arg control when value changes
onChange(value) {
updateArgs({ value });
}
// onChange(value) {
// updateArgs({ value });
// }
};
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,30 +20,31 @@ import lng from '@lightningjs/core';
import Slider from './SliderLarge';
import { createModeControl } from '../../docs/utils';
import TextBox from '../TextBox';
import { useArgs } from '@storybook/manager-api';
// TODO: Re-implement after figuring out how to in Storybook 8; worked in 7.
// import { useArgs } from '@storybook/manager-api';

export default {
title: 'Components/Slider/SliderLarge'
};

export const Basic = () => {
const [{ value }, updateArgs] = useArgs();
// const [{ value }, updateArgs] = useArgs();
return class Basic extends lng.Component {
static _template() {
return {
Slider: {
type: Slider,
value: value,
signals: {
onChange: true
}
type: Slider
// value: value,
// signals: {
// onChange: true
// }
}
};
}
// update arg control when value changes
onChange(value) {
updateArgs({ value });
}
// onChange(value) {
// updateArgs({ value });
// }
};
};

Expand Down

0 comments on commit b735568

Please sign in to comment.