Skip to content

Wrong prop name 'variant' in Variant vue component types #829

Description

@timothee-durand

Describe the bug

The meta props is named variant instead of meta in the component types https://github.com/histoire-dev/histoire/blob/f04001937b86d330d1b8df3483adbad4bfbcc57c/packages/histoire-plugin-vue/components.d.ts
(the actual code, sorry there is a bug from github that prevent me to provide a direct link to the correct line)

  /**
   * Free form meta data.
   *
   * You can type it with:
   *
   * ```ts
   * declare module 'histoire' {
   *    // For both Story and Variant
   *    interface CommonMeta {
   *     myMeta: string
   *    }
   *
   *   // Only for Variant
   *   interface VariantMeta {
   *     myMeta: string
   *   }
   * }
   * ```
   */
  variant?: VariantMeta

but is declared as meta in the props of the component and is not working if using variant :

and in the docs : https://histoire.dev/guide/vue3/wrapper.html

Reproduction

I can provide a reproduction if you want but it seems pretty obvious to me ?

System Info

System:
    OS: macOS 26.3
    CPU: (10) arm64 Apple M2 Pro
    Memory: 76.92 MB / 16.00 GB
    Shell: 5.9 - /bin/zsh
  Binaries:
    Node: 22.17.0 - 
    npm: 10.9.2 - 
    pnpm: 10.27.0 - 
    bun: 1.2.5 -
    Deno: 2.6.8 - 
  Browsers:
    Chrome: 145.0.7632.75
    Firefox: 147.0.2
    Safari: 26.3
  npmPackages:
    @histoire/app: 1.0.0-beta.1 => 1.0.0-beta.1 
    @histoire/controls: 1.0.0-beta.1 => 1.0.0-beta.1 
    @histoire/plugin-vue: 1.0.0-beta.1 => 1.0.0-beta.1 
    @histoire/shared: 1.0.0-beta.1 => 1.0.0-beta.1 
    @histoire/vendors: 1.0.0-beta.1 => 1.0.0-beta.1 
    @vitejs/plugin-vue: ^6.0.4 => 6.0.4 
    histoire: 1.0.0-beta.1 => 1.0.0-beta.1 
    vite: ^7.3.1 => 7.3.1

Used Package Manager

pnpm

Validations

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    to triageThis issue needs to be triaged

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions