11import plugin from "tailwindcss/plugin" ;
2- import { GRID_CELL_SIZE , LINE_WIDTHS , OFFSETS , arrToObj } from "./consts" ;
2+ import { GRID_CELL_SIZE , LINE_WIDTHS , OFFSETS } from "./consts" ;
33import { generateCellSizes , matchCellSize } from "./lib/cellSizes" ;
44import {
55 generateLineColors ,
@@ -10,6 +10,7 @@ import { generateOffsets, matchOffsets } from "./lib/offsets";
1010import { resolveOptions } from "./lib/resolveOptions" ;
1111import { generateGridClass } from "./patterns/grid" ;
1212import type { IOptions } from "./types" ;
13+ import { arrToTwConfig } from "./lib/arrToTwConfig" ;
1314
1415export default plugin . withOptions < IOptions | undefined > (
1516 ( options ) => ( api ) => {
@@ -32,9 +33,9 @@ export default plugin.withOptions<IOptions | undefined>(
3233 } ,
3334 ( ) => ( {
3435 theme : {
35- bgPatternLineWidth : arrToObj ( LINE_WIDTHS ) ,
36- bgPatternCellSize : arrToObj ( GRID_CELL_SIZE ) ,
37- bgPatternOffsets : arrToObj ( OFFSETS , "px" ) ,
36+ bgPatternLineWidth : arrToTwConfig ( LINE_WIDTHS ) ,
37+ bgPatternCellSize : arrToTwConfig ( GRID_CELL_SIZE ) ,
38+ bgPatternOffsets : arrToTwConfig ( OFFSETS , "px" ) ,
3839 } ,
3940 } ) ,
4041) ;
0 commit comments