-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Consolidate all the provider to single Provider
- Loading branch information
1 parent
6b58460
commit f1436eb
Showing
16 changed files
with
111 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
import { | ||
Provider as TooltipProvider, | ||
TooltipProviderProps, | ||
} from "@radix-ui/react-tooltip"; | ||
import { ToastProps } from "@radix-ui/react-toast"; | ||
import { ToastProvider } from "@/components/Toast/Toast"; | ||
import { ThemeName } from "@/theme"; | ||
import { ThemeProvider } from "@/theme/theme"; | ||
|
||
type Props = TooltipProviderProps & | ||
ToastProps & { | ||
theme: ThemeName; | ||
}; | ||
|
||
const ClickUIProvider = ({ | ||
children, | ||
theme, | ||
delayDuration, | ||
skipDelayDuration, | ||
disableHoverableContent, | ||
...props | ||
}: Props) => { | ||
return ( | ||
<ThemeProvider theme={theme}> | ||
<ToastProvider {...props}> | ||
<TooltipProvider | ||
delayDuration={delayDuration} | ||
skipDelayDuration={skipDelayDuration} | ||
disableHoverableContent={disableHoverableContent} | ||
> | ||
{children} | ||
</TooltipProvider> | ||
</ToastProvider> | ||
</ThemeProvider> | ||
); | ||
}; | ||
|
||
export default ClickUIProvider; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
import { Meta, IconGallery, IconItem } from "@storybook/blocks"; | ||
import LogosLight from "./LogosLight.ts" | ||
import { Logo } from "./Logo" | ||
import { ThemeProvider } from "../../theme"; | ||
import { ClickUIProvider } from ".."; | ||
|
||
<Meta title='Display/Logo/Logos' /> | ||
|
||
# Logos | ||
|
||
<ThemeProvider theme='light'> | ||
<ClickUIProvider theme='light'> | ||
<IconGallery> | ||
{Object.keys(LogosLight).map((iconName) => ( | ||
<IconItem name={iconName} key={iconName}> | ||
<Logo name={iconName} /> | ||
</IconItem> | ||
))} | ||
</IconGallery> | ||
</ThemeProvider> | ||
</ClickUIProvider> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.