@@ -3,25 +3,24 @@ const _ = require('lodash');
3
3
module . exports = ( {
4
4
variants = { } ,
5
5
gradients = { } ,
6
- } = { } ) =>
7
- ( { e, addUtilities } ) => {
8
- addUtilities (
9
- {
10
- ...Object . assign (
11
- { } ,
12
- ..._ . map ( gradients , ( colors , name ) => {
13
- if ( ! _ . isArray ( colors ) ) {
14
- colors = [ 'transparent' , colors ] ;
15
- }
16
- return {
17
- [ `.bg-gradient-to-top-${ e ( name ) } ` ] : { backgroundImage : `linear-gradient(to top, ${ colors . join ( ', ' ) } )` } ,
18
- [ `.bg-gradient-to-right-${ e ( name ) } ` ] : { backgroundImage : `linear-gradient(to right, ${ colors . join ( ', ' ) } )` } ,
19
- [ `.bg-gradient-to-bottom-${ e ( name ) } ` ] : { backgroundImage : `linear-gradient(to bottom, ${ colors . join ( ', ' ) } )` } ,
20
- [ `.bg-gradient-to-left-${ e ( name ) } ` ] : { backgroundImage : `linear-gradient(to left, ${ colors . join ( ', ' ) } )` } ,
21
- } ;
22
- } ) ,
23
- ) ,
24
- } ,
25
- variants ,
26
- ) ;
27
- } ;
6
+ } = { } ) => ( { e, addUtilities } ) => {
7
+ addUtilities (
8
+ {
9
+ ...Object . assign (
10
+ { } ,
11
+ ..._ . map ( gradients , ( colors , name ) => {
12
+ if ( ! _ . isArray ( colors ) ) {
13
+ colors = [ 'transparent' , colors ] ;
14
+ }
15
+ return {
16
+ [ `.${ e ( `bg-gradient-to-top-${ name } ` ) } ` ] : { backgroundImage : `linear-gradient(to top, ${ colors . join ( ', ' ) } )` } ,
17
+ [ `.${ e ( `bg-gradient-to-right-${ name } ` ) } ` ] : { backgroundImage : `linear-gradient(to right, ${ colors . join ( ', ' ) } )` } ,
18
+ [ `.${ e ( `bg-gradient-to-bottom-${ name } ` ) } ` ] : { backgroundImage : `linear-gradient(to bottom, ${ colors . join ( ', ' ) } )` } ,
19
+ [ `.${ e ( `bg-gradient-to-left-${ name } ` ) } ` ] : { backgroundImage : `linear-gradient(to left, ${ colors . join ( ', ' ) } )` } ,
20
+ } ;
21
+ } ) ,
22
+ ) ,
23
+ } ,
24
+ variants ,
25
+ ) ;
26
+ } ;
0 commit comments