1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

Remove duplicate card shape functions

This commit is contained in:
Bill Thornton 2023-10-01 02:49:36 -04:00
parent 4cbff9dbd7
commit 1e3fa5418c
16 changed files with 294 additions and 339 deletions

20
src/utils/card.ts Normal file
View file

@ -0,0 +1,20 @@
enum CardShape {
Backdrop = 'backdrop',
BackdropOverflow = 'overflowBackdrop',
Portrait = 'portrait',
PortraitOverflow = 'overflowPortrait',
Square = 'square',
SquareOverflow = 'overflowSquare'
}
export function getSquareShape(enableOverflow = true) {
return enableOverflow ? CardShape.SquareOverflow : CardShape.Square;
}
export function getBackdropShape(enableOverflow = true) {
return enableOverflow ? CardShape.BackdropOverflow : CardShape.Backdrop;
}
export function getPortraitShape(enableOverflow = true) {
return enableOverflow ? CardShape.PortraitOverflow : CardShape.Portrait;
}