Skip to content

v2.0.0

Choose a tag to compare

@github-actions github-actions released this 31 May 13:58

πŸ’₯ Breaking Change

direction is now only set using the globals API.

Instead of using story parameters, direction can now be set per-story using globals: {addonRtl: 'rtl'}.

Instead of listening to events on the channel, you can get/set the value using import { useGlobals } from 'storybook/preview-api' or other storybook APIs.

Instead of setting url parameters like &direction=ltr, you should do &globals=addonRtl:ltr.

Instead of setting the direction on the document element, direction is now set on the element that wraps each story (context.canvasElement)

πŸš€ Feature

  • Changing direction now works in the Docs view #12
  • Changing direction now works in iFrames or when viewing the standalone story #11

πŸ› Bug Fix

Authors: 1