Web: Components: Remove applying RTL to storybook docs

This commit is contained in:
Aleksandr Lushkin 2023-07-11 19:09:56 +02:00
parent 530e99034a
commit c48ba03028
2 changed files with 15 additions and 3 deletions

View File

@ -9,9 +9,7 @@ import "../index";
import lightTheme from "./lightTheme";
import darkTheme from "./darkTheme";
import lightLogo from "./lightsmall.svg?url";
import darkLogo from "./darksmall.svg?url";
import StorybookGlobalStyles from "./styles/StorybookGlobalStyles";
const preview = {
globalTypes,
@ -43,6 +41,7 @@ const preview = {
return (
<ThemeWrapper theme={{ ...theme, interfaceDirection }}>
<StorybookGlobalStyles />
<Story />
</ThemeWrapper>
);

View File

@ -0,0 +1,13 @@
import { createGlobalStyle } from "styled-components";
const StorybookGlobalStyles = createGlobalStyle`
.sbdocs-content {
direction: ltr;
}
.sbdocs-content .docs-story {
direction: ${(props) => props.theme.interfaceDirection};
}
`;
export default StorybookGlobalStyles;