storybook-addon-rtl
Version:
Right-to-left addon for Storybook.
20 lines (17 loc) • 806 B
TypeScript
declare const INITIALIZE_EVENT_ID = "storybook/rtl/rtl-initialize";
/**
* The ID for an event that is emitted in the Storybook channel whenever an change to the direction happens.
* Events of this type should be accompanied by a parameter with a type of {@link RTLChangeEvent}
*/
declare const UPDATE_EVENT_ID = "storybook/rtl/rtl-update";
type RTLDirection = "rtl" | "ltr";
type RTLChangeEvent = {
direction: RTLDirection;
/**
* Whether this event is the result of a user interaction,
* or something else (like the initial state, or the parameter of a story)
*/
userInteraction: boolean;
};
declare const _default: {};
export { type RTLChangeEvent, type RTLDirection, INITIALIZE_EVENT_ID as RTL_INITIALIZE_EVENT, UPDATE_EVENT_ID as RTL_UPDATE_EVENT, _default as default };