@@ -145,4 +145,35 @@ export function visualUtility() {
145145 }
146146 } , 3000 ) ;
147147
148+ strokeButtons . forEach ( button => {
149+ button . addEventListener ( 'mouseenter' , ( ) => {
150+ gsap . to ( button , { color : "var(--saffron-3)" , duration : 0.3 } ) ;
151+ gsap . to ( button . querySelectorAll ( '.k-stroke-cta-content' ) , { y : '-100%' , duration : 0.7 , ease : "expo.out" } ) ;
152+ } ) ;
153+
154+ button . addEventListener ( 'mouseleave' , ( ) => {
155+ gsap . to ( button , { color : "" , duration : 0.3 } ) ;
156+ gsap . to ( button . querySelectorAll ( '.k-stroke-cta-content' ) , { y : '0%' , duration : 0.7 , ease : "expo.out" } ) ;
157+ } ) ;
158+ } ) ;
159+
160+ const solidButtons = document . querySelectorAll ( '.k-solid-button' ) ;
161+
162+ solidButtons . forEach ( button => {
163+ const icons = button . querySelectorAll ( '.k-solid-button-icon' ) ;
164+ const text = button . querySelector ( '.k-solid-button-text' ) ;
165+
166+ button . addEventListener ( 'mouseenter' , ( ) => {
167+ gsap . to ( icons [ 0 ] , { scale : 1 , duration : 0.5 , ease : "expo.out" } ) ;
168+ gsap . to ( icons [ 1 ] , { scale : 0 , duration : 0.5 , ease : "expo.out" } ) ;
169+ gsap . to ( text , { x : "0.6rem" , duration : 0.5 , ease : "expo.out" } ) ;
170+ } ) ;
171+
172+ button . addEventListener ( 'mouseleave' , ( ) => {
173+ gsap . to ( icons [ 0 ] , { scale : 0 , duration : 0.5 , ease : "expo.out" } ) ;
174+ gsap . to ( icons [ 1 ] , { scale : 1 , duration : 0.5 , ease : "expo.out" } ) ;
175+ gsap . to ( text , { x : "0rem" , duration : 0.5 , ease : "expo.out" } ) ;
176+ } ) ;
177+ } ) ;
178+
148179}
0 commit comments