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:
parent
4cbff9dbd7
commit
1e3fa5418c
16 changed files with 294 additions and 339 deletions
20
src/utils/card.ts
Normal file
20
src/utils/card.ts
Normal 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;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue