We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Storybook's preview.ts is set as follows.
preview.ts
import { setCustomElementsManifest, type Preview, } from "@storybook/web-components"; import customElements from "/path/to/custom-elements.json"; setCustomElementsManifest(customElements); const preview: Preview = { parameters: { controls: { matchers: { color: /(background|color)$/i, date: /Date$/i, text: /label$/i, }, }, }, }; export default preview;
I define the following MyButton custom element.
@customElement('my-button') export class MyButton extends LitElement { @property({type: String}) color: string = "blue"; }
In this case, the value of argTypes.color.control is text.
argTypes.color.control
const { argTypes } = getWcStorybookHelpers("my-button"); argTypes.color.control // => 'text'
The expected behavior is that the value of control should be color since mathcers is defined in preview.ts.
mathcers
The text was updated successfully, but these errors were encountered:
I will see if there is a way to tap into that config when building the stories.
Sorry, something went wrong.
No branches or pull requests
Storybook's
preview.ts
is set as follows.I define the following MyButton custom element.
In this case, the value of
argTypes.color.control
is text.The expected behavior is that the value of control should be color since
mathcers
is defined inpreview.ts
.The text was updated successfully, but these errors were encountered: