2023-10-15 02:02:51 -04:00
|
|
|
export enum CardShape {
|
2023-10-01 02:49:36 -04:00
|
|
|
Backdrop = 'backdrop',
|
|
|
|
BackdropOverflow = 'overflowBackdrop',
|
2023-10-15 02:02:51 -04:00
|
|
|
Banner = 'banner',
|
2023-10-01 02:49:36 -04:00
|
|
|
Portrait = 'portrait',
|
|
|
|
PortraitOverflow = 'overflowPortrait',
|
|
|
|
Square = 'square',
|
2024-02-28 22:47:36 +03:00
|
|
|
SquareOverflow = 'overflowSquare',
|
|
|
|
Auto = 'auto',
|
|
|
|
AutoHome = 'autohome',
|
|
|
|
AutoOverflow = 'autooverflow',
|
|
|
|
AutoVertical = 'autoVertical',
|
|
|
|
Mixed = 'mixed',
|
|
|
|
MixedSquare = 'mixedSquare',
|
|
|
|
MixedBackdrop = 'mixedBackdrop',
|
2024-08-21 02:54:09 -04:00
|
|
|
MixedPortrait = 'mixedPortrait'
|
2023-10-01 02:49:36 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
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;
|
|
|
|
}
|