storybook-design-token icon indicating copy to clipboard operation
storybook-design-token copied to clipboard

Design tokens are not displayed in story-book if there is only a category name.

Open SmoliyY opened this issue 2 years ago • 4 comments

Version

storybook-design-token: 2.6.0

Steps to Reproduce

Create basic storybook with next design-tokens. Example:

:root {
  /**
  * @tokens Animations
  * @presenter Animation
  */

  --animation-rotate: rotate 1.2s infinite cubic-bezier(0.55, 0, 0.1, 1);

  /**
  * @tokens Colors
  * @presenter Color
  */

  --b100: hsl(240, 100%, 90%); /* Token Description Example  @presenter Color */
  --b200: hsl(240, 100%, 80%);
  --b300: hsl(240, 100%, 70%);

  /**
  * @tokens Others
  */
  --border-normal: 3px dashed red; /* Token Description Example @presenter BorderRadius */
}

Current Behavior

Animations and Colors sections displayed as expected, but not Others. Screenshot 2022-08-17 at 18 49 43

Expected Behavior

Others section should be displayed with appropriate @presenter BorderRadius preview.

SmoliyY avatar Aug 17 '22 15:08 SmoliyY

Hey, I'll look into it. Passing an empty presenter should help as a workaround.

Sqrrl avatar Sep 16 '22 13:09 Sqrrl

@Sqrrl I am also running into same issue and passing an empty presenter doesn't work for me. Do you have an example?

abhiofficial66 avatar Dec 19 '22 14:12 abhiofficial66

Could you check v2.8.2? I've fixed an issue that might have been related.

Sqrrl avatar Dec 19 '22 14:12 Sqrrl

@Sqrrl it does work as expected on v2.8.2. Thank you for your quick respons 🙌

daphne avatar Dec 20 '22 12:12 daphne