Skip to content

Instantly share code, notes, and snippets.

@johanvanhelden
Last active July 7, 2023 10:22
Show Gist options
  • Save johanvanhelden/59abcf104c03d07e08d34eb11fd51511 to your computer and use it in GitHub Desktop.
Save johanvanhelden/59abcf104c03d07e08d34eb11fd51511 to your computer and use it in GitHub Desktop.
Storybook 7.0.26 issue with custom args
import type { Meta, StoryObj } from '@storybook/vue3';
import Component from './ReproComponent.vue';
const meta: Meta<typeof Component> = {
component: Component,
render: (args, { argTypes }) => ({
components: { Component },
props: Object.keys(argTypes),
template: `
<Component v-bind="$props">
Card content
<template #footer v-if="withFooter">
Footer for the card
</template>
</Component>
`,
}),
args: {
withFooter: true,
},
};
export default meta;
type Story = StoryObj<typeof Component>;
export const Default: Story = {};
<template>
<div>
<slot />
<h3 v-if="$slots.footer">
<slot name="footer"></slot>
</h3>
</div>
</template>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment