forked from crowetic/commerce
use bg-image
This commit is contained in:
parent
b15ae59aaf
commit
e4f8a74f63
@ -10,10 +10,12 @@
|
|||||||
|
|
||||||
.leftControl {
|
.leftControl {
|
||||||
@apply left-6;
|
@apply left-6;
|
||||||
|
background-image: url('public/cursor-left.png');
|
||||||
}
|
}
|
||||||
|
|
||||||
.rightControl {
|
.rightControl {
|
||||||
@apply right-6;
|
@apply right-6;
|
||||||
|
background-image: url('public/cursor-right.png');
|
||||||
}
|
}
|
||||||
|
|
||||||
.control {
|
.control {
|
||||||
@ -66,11 +68,3 @@
|
|||||||
.positionIndicatorActive:hover .dot {
|
.positionIndicatorActive:hover .dot {
|
||||||
@apply bg-white;
|
@apply bg-white;
|
||||||
}
|
}
|
||||||
/* sx={{
|
|
||||||
width: '10px',
|
|
||||||
height: '10px',
|
|
||||||
bg: currentSlide === idx ? 'primary' : 'gray',
|
|
||||||
borderRadius: 'full',
|
|
||||||
mx: 2,
|
|
||||||
'&:focus': { outline: 'none' },
|
|
||||||
}} */
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import { useKeenSlider } from 'keen-slider/react'
|
import { useKeenSlider } from 'keen-slider/react'
|
||||||
|
import Image from 'next/image'
|
||||||
import React, { Children, FC, isValidElement, useState } from 'react'
|
import React, { Children, FC, isValidElement, useState } from 'react'
|
||||||
import { HiChevronLeft, HiChevronRight } from 'react-icons/hi'
|
|
||||||
import cn from 'classnames'
|
import cn from 'classnames'
|
||||||
|
|
||||||
import s from './ProductSlider.module.css'
|
import s from './ProductSlider.module.css'
|
||||||
@ -20,12 +20,11 @@ const ProductSlider: FC = ({ children }) => {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={s.root}>
|
<div className={s.root}>
|
||||||
<button className={cn(s.leftControl, s.control)} onClick={slider?.prev}>
|
<button className={cn(s.leftControl, s.control)} onClick={slider?.prev} />
|
||||||
<HiChevronLeft />
|
<button
|
||||||
</button>
|
className={cn(s.rightControl, s.control)}
|
||||||
<button className={cn(s.rightControl, s.control)} onClick={slider?.next}>
|
onClick={slider?.next}
|
||||||
<HiChevronRight />
|
/>
|
||||||
</button>
|
|
||||||
<div
|
<div
|
||||||
ref={ref}
|
ref={ref}
|
||||||
className="keen-slider h-full transition-opacity duration-150"
|
className="keen-slider h-full transition-opacity duration-150"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user