controls and @storybook/web-components-vite #32040
Unanswered
flipkickmedia
asked this question in
Help
Replies: 1 comment
-
Hello @flipkickmedia, be sure to switch to "Web Components" while browsing the documentation, from the code you pasted it seems your still looking a React examples. ![]() Not sure what your import { html } from 'lit';
import './Button';
const meta = {
title: 'Button',
component: 'x-button',
render: args => html`
<x-button variant=${args.variant}></x-button>
`
};
export default meta;
export const Primary = {
args: {
variant: 'primary',
},
}; You'll also be able to find some examples in the sources directly. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
The documentation at https://storybook.js.org/docs/essentials/controls#choosing-the-control-type provides an example:
This doesnt work as there are errors on lines 6 and 14.
Additional information
The errors are:
Here component is not defined on Meta
and
The error here is that variant does not exist in Partial
Im not sure what Im missing here. any help would be appreciated.
Create a reproduction
No response
Beta Was this translation helpful? Give feedback.
All reactions