Skip to content

Commit

Permalink
fix(): Disable iife.
Browse files Browse the repository at this point in the history
  • Loading branch information
aidanCQ committed Dec 18, 2023
1 parent db16547 commit 08ce27b
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .storybook/preview-head.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@

<!-- Or you can load custom head-tag JavaScript: -->

<script
<!-- <script
src="dist/src/utils/syncTheme.js"
type="application/javascript"
></script>
></script> -->

<link rel="preconnect" href="https://fonts.googleapis.com" />
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
Expand Down
2 changes: 1 addition & 1 deletion src/utils/index.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { clsx, type ClassValue } from "clsx";
import { twMerge } from "tailwind-merge";
export * from "./darkMode";
export * from "./syncTheme";
// export * from "./syncTheme";
export function cn(...inputs: ClassValue[]) {
return twMerge(clsx(inputs));
}
8 changes: 4 additions & 4 deletions src/utils/syncTheme.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { theme } from "./darkMode";
// import { theme } from "./darkMode";
// This script sets up event listeners to set the appropriate css class in the DOM for the current theme. It's intended to be executed in the head of the document hence it is immediately invoked (IIFE).
(() => {
theme.syncTheme();
})();
// (() => {
// theme.syncTheme();
// })();

0 comments on commit 08ce27b

Please sign in to comment.