File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -32,13 +32,16 @@ const Button = ({
32
32
isHero = false ,
33
33
href,
34
34
} : IButtonProps ) => {
35
+ const getColorClasses = ( buttonColor : TButtonColors ) => {
36
+ if ( buttonColor === 'blue' ) {
37
+ return 'bg-blue-500 hover:bg-blue-600' ;
38
+ }
39
+ return 'bg-red-500 hover:bg-red-600' ;
40
+ } ;
41
+
35
42
const buttonClasses = isHero
36
- ? 'inline-block px-8 py-4 text-sm tracking-wider uppercase bg-white text-gray-900 hover:bg-gray-400 hover:text-white shadow-md'
37
- : `px-2 lg:px-4 py-2 font-bold border border-gray-400 border-solid rounded text-white ${
38
- color === 'blue'
39
- ? 'bg-blue-500 hover:bg-blue-600'
40
- : 'bg-red-500 hover:bg-red-600'
41
- } `;
43
+ ? 'inline-block px-8 py-4 text-sm tracking-wider uppercase bg-white bg-opacity-90 text-gray-900 hover:bg-gray-400 hover:bg-opacity-95 hover:text-white hover:shadow-md'
44
+ : `px-2 lg:px-4 py-2 font-bold border border-gray-400 border-solid rounded text-white ${ getColorClasses ( color ) } ` ;
42
45
43
46
const classes = `${ buttonClasses } ease-in-out transition-all duration-300 disabled:opacity-50 ${
44
47
fullWidth ? 'w-full md:w-auto' : ''
You can’t perform that action at this time.
0 commit comments