Skip to content

Commit

Permalink
fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
ndelangen committed Jul 5, 2022
1 parent a5c35e1 commit 8936e57
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/external-docs/pages/api/hello.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Next.js API route support: https://nextjs.org/docs/api-routes/introduction

export default function handler(req, res) {
res.status(200).json({ name: 'John Doe' })
res.status(200).json({ name: 'John Doe' });
}
9 changes: 7 additions & 2 deletions lib/addons/src/hooks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -424,12 +424,17 @@ export function useParameter<S>(parameterKey: string, defaultValue?: S): S | und
}

/* Returns current value of story args */
export function useArgs<SpecificArgs = Args>(): [SpecificArgs, (newArgs: Partial<SpecificArgs>) => void, (argNames?: (keyof SpecificArgs)[]) => void] {
export function useArgs<SpecificArgs = Args>(): [
SpecificArgs,
(newArgs: Partial<SpecificArgs>) => void,
(argNames?: (keyof SpecificArgs)[]) => void
] {
const channel = addons.getChannel();
const { id: storyId, args } = useStoryContext();

const updateArgs = useCallback(
(updatedArgs: Partial<SpecificArgs>) => channel.emit(UPDATE_STORY_ARGS, { storyId, updatedArgs }),
(updatedArgs: Partial<SpecificArgs>) =>
channel.emit(UPDATE_STORY_ARGS, { storyId, updatedArgs }),
[channel, storyId]
);

Expand Down
2 changes: 1 addition & 1 deletion lib/theming/create.js
Original file line number Diff line number Diff line change
@@ -1 +1 @@
export * from './dist/esm';
export * from './dist/index.mjs';

0 comments on commit 8936e57

Please sign in to comment.