lib/store/src/csf/getValuesFromArgTypes.ts
import type { ArgTypes } from '@storybook/csf';
export const getValuesFromArgTypes = (argTypes: ArgTypes = {}) =>
Object.entries(argTypes).reduce((acc, [arg, { defaultValue }]) => {
if (typeof defaultValue !== 'undefined') {
acc[arg] = defaultValue;
}
return acc;
}, {} as ArgTypes);