mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
20 lines
628 B
TypeScript
20 lines
628 B
TypeScript
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;
|
|
}
|