Skip to content
New issue

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

Ability to group Variants within a Story #731

Open
4 tasks done
davestewart opened this issue Jun 6, 2024 · 0 comments
Open
4 tasks done

Ability to group Variants within a Story #731

davestewart opened this issue Jun 6, 2024 · 0 comments
Labels
enhancement: to triage New feature of request pending review by team member

Comments

@davestewart
Copy link

davestewart commented Jun 6, 2024

Clear and concise description of the problem

Say you have a component which has formatting and size props.

It would be nice to be able to see variants of each prop in separate section, rather than just all run together.

Suggested solution

I suggest a new <Chapter> component (seeing as group is already another term in Histoire):

<template>
  <Story :layout="{ type: 'grid', width: '400' }">

    <Chapter title="Formatting">
      <Variant title="default">
        <UiFigure>0.151351483</UiFigure>
      </Variant>
      ...
    </Chapter>

    <Chapter title="Size">
      <Variant title="default">
        <UiFigure size="xl">0.151351483</UiFigure>
      </Variant>     
      ...

The page would then show each set of props with a title and the variants nested within.

Or maybe <Chapter> could be <Variants> or <VariantGroup>.

Alternative

None

Additional context

Here's an example of where we would find this useful:

CleanShot 2024-06-06 at 09 29 17

Validations

@davestewart davestewart added the enhancement: to triage New feature of request pending review by team member label Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement: to triage New feature of request pending review by team member
Projects
None yet
Development

No branches or pull requests

1 participant