UNPKG

messonry

Version:

A messy grid layout library for React. Like a masonry layout; except that it crops images as little as possible, and displays them as close to their original aspect ratio as possible.

7 lines (6 loc) 345 B
export declare type SupportedAspectRatio = "hidden" | "1x1" | "5x4" | "4x3" | "7x5" | "3x2" | "16x9" | "2x1" | "3x1" | "4x5" | "3x4" | "5x7" | "2x3" | "9x16" | "1x2" | "1x3"; export declare type Dimensions = { width: number; height: number; }; export declare function getAspectRatio({ width, height }: Dimensions): SupportedAspectRatio;