From 2aa0b81fb90ab95a4e806bb0673515d7ea347e71 Mon Sep 17 00:00:00 2001 From: Corban Riley Date: Mon, 6 Nov 2023 12:32:30 -0500 Subject: [PATCH] Added root and scope props to ThemeProvider which allow ThemeProvider to attach theme selector to a specific root element and persist it under a specific scope name --- .../ThemeProvider/ThemeProvider.stories.tsx | 73 +++++++++++++++++++ .../ThemeProvider/ThemeProvider.tsx | 26 ++++--- 2 files changed, 90 insertions(+), 9 deletions(-) diff --git a/src/components/ThemeProvider/ThemeProvider.stories.tsx b/src/components/ThemeProvider/ThemeProvider.stories.tsx index 150e4b46a..d880086f3 100644 --- a/src/components/ThemeProvider/ThemeProvider.stories.tsx +++ b/src/components/ThemeProvider/ThemeProvider.stories.tsx @@ -2,6 +2,11 @@ import { Meta } from '@storybook/react' import { Button } from '~/components/Button' +import { Box } from '../Box' +import { Card } from '../Card' +import { Collapsible } from '../Collapsible' +import { Text } from '../Text' + import { ThemeProvider, useTheme } from './ThemeProvider' export default { @@ -17,3 +22,71 @@ export const Default = () => { return