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 66 getShadowSpread ,
77 getShadowColor ,
88 getResultPage ,
9+ getResultButton ,
910 getCopyCodeButton ,
1011 getPreviewSlider ,
1112 getShadowFields ,
@@ -16,6 +17,7 @@ import {
1617 getCssOrTailwindDropdown ,
1718} from '../lib/getElements' ;
1819import {
20+ triggerEmptyAnimation ,
1921 copyCSSCodeToClipboard ,
2022 copyTailwindCodeToClipboard ,
2123 showPopup ,
@@ -35,7 +37,6 @@ const attribute = 'box-shadow';
3537let isSliderOpen = false ;
3638const getCssOrTailwindDropdownElement = getCssOrTailwindDropdown ( attribute ) ;
3739const showCopyClass = 'show-css-tailwind' ;
38-
3940function copyHandler ( ) {
4041 const outputElement = getOutput ( attribute ) ;
4142 copyCSSCodeToClipboard ( attribute , outputElement ) ;
@@ -67,6 +68,21 @@ export function boxShadowGenerator(
6768 const getOutputElement = getOutput ( attribute ) ;
6869 const resultPage = getResultPage ( ) ;
6970
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+
7086 resultPage . style . display = 'flex' ;
7187 if ( type === 'oldResults' ) return ;
7288
You can’t perform that action at this time.
0 commit comments