Skip to content

Commit 56e1fdc

Browse files
authored
fix: correct min-width utility implementation
1 parent 022bdf1 commit 56e1fdc

File tree

2 files changed

+11
-13
lines changed

2 files changed

+11
-13
lines changed

src/index.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import plugin from "tailwindcss/plugin"
2-
import { PluginCreator } from "tailwindcss/types/config"
2+
import { KeyValuePair, PluginCreator, ResolvableTo } from "tailwindcss/types/config"
33
import { scrollUtilities } from "./utilities/scroll-utility";
44
import { fluencyUtilities } from "./utilities/fluency-utility";
55
import { selectorUtilities } from "./utilities/selector-utility";
@@ -21,6 +21,8 @@ export const creator: PluginCreator = (configApi) => {
2121

2222
export default plugin(creator, {
2323
theme: {
24-
minWidth: minWidthUtilities
24+
extend: {
25+
minWidth: minWidthUtilities
26+
}
2527
}
2628
})

src/utilities/min-width-utility.ts

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
1-
import { Config } from "tailwindcss";
1+
import type { KeyValuePair, ResolvableTo } from "tailwindcss/types/config"
22

33
/**
44
* Defines default values for the minWidth theme in TailwindCSS.
55
* It provides a set of predefined minimum widths.
66
*/
7-
export const minWidthUtilities: Partial<Config> = {
8-
theme: {
9-
minWidth: {
10-
sm: "640px",
11-
md: "768px",
12-
lg: "1024px",
13-
xl: "1280px",
14-
"2xl": "1526px"
15-
}
16-
}
7+
export const minWidthUtilities: ResolvableTo<KeyValuePair<string, string>> = {
8+
"sm": "640px",
9+
"md": "768px",
10+
"lg": "1024px",
11+
"xl": "1280px",
12+
"2xl": "1526px"
1713
}

0 commit comments

Comments
 (0)