import React from "react";
import { Decorator, Meta } from "@storybook/react";
import { expect, userEvent, within } from "storybook/test";
import { getElementDirection } from "./utils";
import { useGlobals } from "storybook/preview-api";
const SimpleText = () => {
return
This is some example text
;
};
/**
* This is an example decorator that shows how the Storybook channel API can be used
* to read and change the current direction of the addon.
*/
const withDirectionToggle: Decorator = (Story) => {
const [globals, setGlobals] = useGlobals();
const direction = globals.addonRtl;
const setDirection = (direction: "ltr" | "rtl") => {
setGlobals({ addonRtl: direction });
};
return (