mirror of
https://github.com/vercel/commerce.git
synced 2025-07-22 20:26:49 +00:00
cover full screen and center
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
|
||||
.leftControl,
|
||||
.rightControl {
|
||||
@apply text-white absolute top-1/2 -translate-x-1/2 z-20 w-16 h-16 flex items-center justify-center bg-hover-1 rounded focus:outline-none focus:shadow-outline-blue hover:bg-hover-2;
|
||||
@apply text-white text-xl absolute top-1/2 -translate-x-1/2 z-20 w-16 h-16 flex items-center justify-center bg-hover-1 rounded-full focus:outline-none focus:shadow-outline-blue hover:bg-hover-2;
|
||||
}
|
||||
|
||||
.leftControl {
|
||||
@@ -13,11 +13,11 @@
|
||||
}
|
||||
|
||||
.rightControl {
|
||||
@apply right-6 rotate-180 transform;
|
||||
@apply right-6;
|
||||
}
|
||||
|
||||
.control {
|
||||
@apply opacity-0 transition-all duration-150;
|
||||
@apply opacity-0 transition duration-150;
|
||||
}
|
||||
|
||||
.root:hover .control {
|
||||
|
@@ -1,6 +1,6 @@
|
||||
import { ArrowLeft } from '@components/icon'
|
||||
import { useKeenSlider } from 'keen-slider/react'
|
||||
import React, { Children, FC, isValidElement, useState } from 'react'
|
||||
import { HiChevronLeft, HiChevronRight } from 'react-icons/hi'
|
||||
import cn from 'classnames'
|
||||
|
||||
import s from './ProductSlider.module.css'
|
||||
@@ -17,10 +17,10 @@ const ProductSlider: FC = ({ children }) => {
|
||||
return (
|
||||
<div className={s.root}>
|
||||
<button className={cn(s.leftControl, s.control)} onClick={slider?.prev}>
|
||||
<ArrowLeft />
|
||||
<HiChevronLeft />
|
||||
</button>
|
||||
<button className={cn(s.rightControl, s.control)} onClick={slider?.next}>
|
||||
<ArrowLeft />
|
||||
<HiChevronRight />
|
||||
</button>
|
||||
<div ref={ref} className="keen-slider h-full">
|
||||
{Children.map(children, (child) => {
|
||||
|
Reference in New Issue
Block a user