11"use client" ;
22
3- import {
4- Box ,
5- BoxProps ,
6- Container ,
7- Typography ,
8- useTheme ,
9- } from "@mui/material" ;
3+ import { Box , BoxProps , Container , Typography , useTheme } from "@mui/material" ;
104import Image from "next/image" ;
115
126import boncloud from "@/assets/customers/boncloud.svg" ;
@@ -19,6 +13,8 @@ import tencent from "@/assets/customers/tencent.svg";
1913import weipinhui from "@/assets/customers/weipinhui.svg" ;
2014import xiaomi from "@/assets/customers/xiaomi.svg" ;
2115import zhongxinzhengquan from "@/assets/customers/zhongxinzhengquan.svg" ;
16+ import tigerbrokers from "@/assets/customers/tigerbrokers.svg" ;
17+
2218import Slider from "react-slick" ;
2319import { KeyboardArrowLeft , KeyboardArrowRight } from "@mui/icons-material" ;
2420
@@ -63,6 +59,10 @@ const customers = [
6359 img : zhongxinzhengquan ,
6460 title : "中信证券" ,
6561 } ,
62+ {
63+ img : tigerbrokers ,
64+ title : "老虎证券" ,
65+ } ,
6666] ;
6767
6868const NextArrow = ( props : BoxProps ) => (
@@ -73,7 +73,6 @@ const NextArrow = (props: BoxProps) => (
7373 "&:before" : {
7474 display : "none" ,
7575 } ,
76- display : "none" ,
7776 } }
7877 >
7978 < KeyboardArrowRight color = "action" />
@@ -87,7 +86,6 @@ const PrevArrow = (props: BoxProps) => (
8786 "&:before" : {
8887 display : "none" ,
8988 } ,
90- display : "none" ,
9189 } }
9290 >
9391 < KeyboardArrowLeft color = "action" />
@@ -98,7 +96,7 @@ export default function Customers() {
9896 const theme = useTheme ( ) ;
9997 const settings = {
10098 dots : false ,
101- speed : 600 ,
99+ speed : 800 ,
102100 slidesToShow : 6 ,
103101 slidesToScroll : 6 ,
104102 autoplay : true ,
@@ -115,6 +113,15 @@ export default function Customers() {
115113 } }
116114 />
117115 ) ,
116+ responsive : [
117+ {
118+ breakpoint : 800 ,
119+ settings : {
120+ slidesToShow : 3 ,
121+ slidesToScroll : 3 ,
122+ } ,
123+ } ,
124+ ] ,
118125 } ;
119126
120127 return (
@@ -129,14 +136,30 @@ export default function Customers() {
129136 < Box className = "slider-container" >
130137 < Slider { ...settings } >
131138 { customers . map ( ( item , index ) => (
132- < Box key = { index } sx = { { textAlign : 'center' } } >
133- < Image
134- style = { { display : "inline-block" } }
135- src = { item . img }
136- alt = { item . title }
137- height = { 40 }
138- />
139- < Typography mt = { 2 } sx = { { fontSize : 16 } } > { item . title } </ Typography >
139+ < Box key = { index } >
140+ < Box sx = { {
141+ textAlign : "center" ,
142+ paddingInline : 1 ,
143+ paddingBlock : 2 ,
144+ marginInline : 1 ,
145+ "img" : {
146+ display : "inline-block" ,
147+ } ,
148+ borderRadius : 2 ,
149+ transitionDuration : '0.3s' ,
150+ "&:hover" : {
151+ bgcolor : theme . palette . action . hover ,
152+ }
153+ } } >
154+ < Image
155+ src = { item . img }
156+ alt = { item . title }
157+ height = { 40 }
158+ />
159+ < Typography mt = { 2 } sx = { { fontSize : 16 } } >
160+ { item . title }
161+ </ Typography >
162+ </ Box >
140163 </ Box >
141164 ) ) }
142165 </ Slider >
0 commit comments