Skip to content

Commit

Permalink
feat(carousel): move arrows up and extend text width
Browse files Browse the repository at this point in the history
  • Loading branch information
Iqro-dev committed Oct 24, 2024
1 parent 6ff24da commit b5a620b
Show file tree
Hide file tree
Showing 7 changed files with 109 additions and 109 deletions.
2 changes: 1 addition & 1 deletion app/components/items/cards/item-top-card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ function ItemTopCard({
? `/album/${album.id}?highlighted-track-id=${id}`
: `/${artists ? 'album' : 'artist'}/${id}`
}
className="text-2xl"
className="max-w-[260px] text-2xl"
/>

{artists && <ItemArtists artists={artists} className="text-xl" />}
Expand Down
2 changes: 1 addition & 1 deletion app/components/items/list/items-list.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ function ItemsList({
</div>
</div>

<Carousel className="max-w-[60vw] self-center sm:max-w-[300px] md:hidden">
<Carousel className="max-w-[70vw] self-center sm:max-w-[300px] md:hidden">
<CarouselContent>
{carouselItems.slice(0, 3).map(item => (
<CarouselItem key={item.id}>
Expand Down
2 changes: 1 addition & 1 deletion app/components/items/misc/item-name.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
'use client'

import type { AlbumEntity } from '@app/api/types'
import { LinkButton } from '@app/components/common/buttons'
import { cn } from '@app/utils/cn'
import type { AlbumEntity } from '@app/api/types'

namespace ItemName {
export type Props = Readonly<
Expand Down
4 changes: 2 additions & 2 deletions app/components/ui/carousel.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ const CarouselPrevious = React.forwardRef<
className={cn(
'absolute h-8 w-8 rounded-full hover:bg-white',
orientation === 'horizontal'
? '-left-12 top-1/2 -translate-y-1/2'
? '-left-12 top-1/3 -translate-y-1/2'
: '-top-12 left-1/2 -translate-x-1/2 rotate-90',
className
)}
Expand Down Expand Up @@ -239,7 +239,7 @@ const CarouselNext = React.forwardRef<
className={cn(
'absolute h-8 w-8 rounded-full hover:bg-white',
orientation === 'horizontal'
? '-right-12 top-1/2 -translate-y-1/2'
? '-right-12 top-1/3 -translate-y-1/2'
: '-bottom-12 left-1/2 -translate-x-1/2 rotate-90',
className
)}
Expand Down
28 changes: 14 additions & 14 deletions tests/snapshots/item-top-card.spec.tsx.snap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit b5a620b

Please sign in to comment.