File tree Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Expand file tree Collapse file tree 2 files changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -23,10 +23,10 @@ npm install tailwind-utils
23
23
### Usage
24
24
25
25
``` ts
26
- import createUtils from ' tailwind-utils' ;
27
- import config from ' ./tailwind.config.js' ;
26
+ import Utils from ' tailwind-utils' ;
27
+ import config from ' ./tailwind.config.js' ; // your tailwind config file, optional
28
28
29
- const { parse, classname } = createUtils (config );
29
+ const { parse, classname } = Utils (config );
30
30
31
31
const definition = parse (' w-48' );
32
32
// { prefix: 'w', property: 'width', value: '12rem' }
Original file line number Diff line number Diff line change 1
1
import resolveConfig from 'tailwindcss/resolveConfig' ;
2
2
import type { Config } from 'tailwindcss/types/config' ;
3
3
import flattenColorPalette from 'tailwindcss/lib/util/flattenColorPalette' ;
4
- import { properties , namedClassProperties } from './src/ properties' ;
4
+ import { properties , namedClassProperties } from './properties' ;
5
5
6
- const Tailwind = ( config : Config ) => {
7
- const resolvedConfig = resolveConfig ( config ) ;
6
+ const Tailwind = ( config ?: Config ) => {
7
+ // @ts -ignore resolveConfig doesn't like empty config but stubs it anyways
8
+ const resolvedConfig = resolveConfig ( config || { } ) ;
8
9
const theme = resolvedConfig . theme || { } ;
9
10
10
11
// add negative values to scales
You can’t perform that action at this time.
0 commit comments