Move storybooks dir attr to html element

This commit is contained in:
Jamie Kyle 2024-01-19 17:18:40 -08:00 committed by GitHub
parent 13e44f087e
commit 4dc52a6fff
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -155,8 +155,10 @@ const withGlobalTypesProvider = (Story, context) => {
document.body.classList.add('page-is-visible'); document.body.classList.add('page-is-visible');
document.documentElement.setAttribute('dir', direction);
return ( return (
<div className={styles.container} dir={direction}> <div className={styles.container}>
<StorybookThemeContext.Provider value={theme}> <StorybookThemeContext.Provider value={theme}>
<Story {...context} /> <Story {...context} />
</StorybookThemeContext.Provider> </StorybookThemeContext.Provider>