File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change 6
6
getShadowSpread ,
7
7
getShadowColor ,
8
8
getResultPage ,
9
+ getResultButton ,
9
10
getCopyCodeButton ,
10
11
getPreviewSlider ,
11
12
getShadowFields ,
@@ -16,6 +17,7 @@ import {
16
17
getCssOrTailwindDropdown ,
17
18
} from '../lib/getElements' ;
18
19
import {
20
+ triggerEmptyAnimation ,
19
21
copyCSSCodeToClipboard ,
20
22
copyTailwindCodeToClipboard ,
21
23
showPopup ,
@@ -35,7 +37,6 @@ const attribute = 'box-shadow';
35
37
let isSliderOpen = false ;
36
38
const getCssOrTailwindDropdownElement = getCssOrTailwindDropdown ( attribute ) ;
37
39
const showCopyClass = 'show-css-tailwind' ;
38
-
39
40
function copyHandler ( ) {
40
41
const outputElement = getOutput ( attribute ) ;
41
42
copyCSSCodeToClipboard ( attribute , outputElement ) ;
@@ -67,6 +68,21 @@ export function boxShadowGenerator(
67
68
const getOutputElement = getOutput ( attribute ) ;
68
69
const resultPage = getResultPage ( ) ;
69
70
71
+ if (
72
+ horizontalOffset . value === '' ||
73
+ verticalOffset . value === '' ||
74
+ blur . value === '' ||
75
+ spread . value === '' ||
76
+ color . value === ''
77
+ ) {
78
+ triggerEmptyAnimation ( color ) ;
79
+ const resultBtn = getResultButton ( attribute ) ;
80
+ if ( resultBtn ) {
81
+ resultBtn . style . backgroundColor = 'grey' ;
82
+ }
83
+ return ;
84
+ }
85
+
70
86
resultPage . style . display = 'flex' ;
71
87
if ( type === 'oldResults' ) return ;
72
88
You can’t perform that action at this time.
0 commit comments