Skip to content
This repository has been archived by the owner on Nov 16, 2023. It is now read-only.

Commit

Permalink
feat(tile): add eight by nine aspect ratio (#504)
Browse files Browse the repository at this point in the history
Adds an eight by nine tile aspect ratio, which will be used in the image collage component in modern

client.
  • Loading branch information
jessemartin authored Aug 21, 2018
1 parent 8d28645 commit 9c19e52
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions src/components/Tile/Tile.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,23 @@ const image = <Image source={yammerLogo} description={yammerLogoDescription} ful

<br />

<FixedGridRow>
<FixedGridColumn>
<Tile aspectRatio={TileAspectRatio.EightNine}>{image}</Tile>
</FixedGridColumn>
<FixedGridColumn>
<Tile aspectRatio={TileAspectRatio.EightNine}>{image}</Tile>
</FixedGridColumn>
<FixedGridColumn>
<Tile aspectRatio={TileAspectRatio.EightNine}>{image}</Tile>
</FixedGridColumn>
<FixedGridColumn>
<Tile aspectRatio={TileAspectRatio.EightNine}>{image}</Tile>
</FixedGridColumn>
</FixedGridRow>

<br />

<FixedGridRow>
<FixedGridColumn>
<Tile aspectRatio={TileAspectRatio.OneOne}>{image}</Tile>
Expand Down
1 change: 1 addition & 0 deletions src/components/Tile/Tile.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export interface TileClassNameProps {

const mapAspectRatioToPercent: Record<TileAspectRatio, string> = {
[TileAspectRatio.TwoThree]: '150%',
[TileAspectRatio.EightNine]: '112.5%',
[TileAspectRatio.OneOne]: '100%',
[TileAspectRatio.FourThree]: '75%',
[TileAspectRatio.SixteenNine]: '56.25%',
Expand Down
2 changes: 2 additions & 0 deletions src/components/Tile/Tile.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ export enum TileAspectRatio {
FourThree = '4_3',
/** 1:1 aspect ratio */
OneOne = '1_1',
/** 8:9 aspect ratio */
EightNine = '8_9',
/** 2:3 aspect ratio */
TwoThree = '2_3',
}
Expand Down

0 comments on commit 9c19e52

Please sign in to comment.