storybook-addon-root-attribute icon indicating copy to clipboard operation
storybook-addon-root-attribute copied to clipboard

Can we set title to the Root Attribute tab in Storybook panel?

Open Amarnath510 opened this issue 3 years ago • 1 comments

Thanks for creating this beautiful addon.

One use case, Root attribute tab gets added to the Storybook panel but there is no way I could set the title for it. As per the code in function.js the title seems to be hard coded.

Can we add functionality to pass title to rootAttribute param in addParameters api as below?

// config.js

addParameters({
  rootAttribute: {
    title: 'My Specific title', /* Like this */
    defaultState: {
      name: "Disabled",
      value: null
    },
    states: [
      {
        name: "Enabled",
        value: "custom-class"
      }
    ]
  }
});

Or is there any other way where I can set title to the tab in storybook?

Version I am using: "storybook-addon-root-attribute": "^1.0.2"

Amarnath510 avatar Nov 15 '22 11:11 Amarnath510

@Amarnath510 yep, it is hard coded. You can create PR to allow to change this

le0pard avatar Nov 15 '22 14:11 le0pard