Skip to content

Commit

Permalink
Fix: import err from tailwind config
Browse files Browse the repository at this point in the history
  • Loading branch information
Akalanka47000 committed Jul 27, 2024
1 parent 8df1943 commit 63889ba
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 12 deletions.
2 changes: 1 addition & 1 deletion esbuild.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const options = {
},
plugins: [cleaner],
legalComments: "none",
external: ["react", "react-dom", "@dreamworld/addon-redux", "tailwindcss-scoped-preflight"]
external: ["react", "react-dom", "@dreamworld/addon-redux"]
};

build({
Expand Down
2 changes: 1 addition & 1 deletion src/hooks/breakpoint.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useEffect, useState } from "react";
import { screens } from "../../tailwind.config";
import { screens } from "../utils/tailwind";

const calculateBreakpoints = () =>
Object.entries(screens).reduce((acc, [key, value]) => {
Expand Down
1 change: 1 addition & 0 deletions src/utils/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { ids, selectors } from "@/constants";
export * from "./d3";
export * from "./transformer";
export * from "./workspace";
export * from "./tailwind";

export const fallible = (fn: Function) => {
try {
Expand Down
9 changes: 9 additions & 0 deletions src/utils/tailwind.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export const screens = {
xs: "400px",
xsm: "450px",
sm: "640px",
md: "768px",
lg: "1024px",
xl: "1280px",
xxl: "1536px"
};
11 changes: 1 addition & 10 deletions tailwind.config.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
import animate from "tailwindcss-animate";
import { isolateInsideOfContainer, scopedPreflightStyles } from "tailwindcss-scoped-preflight";

export const screens = {
xs: "400px",
xsm: "450px",
sm: "640px",
md: "768px",
lg: "1024px",
xl: "1280px",
xxl: "1536px"
};
import { screens } from "./src/utils/tailwind";

/** @type {import('tailwindcss').Config} */
export default {
Expand Down

0 comments on commit 63889ba

Please sign in to comment.