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

Commit 9c19e52

Browse files
authored
feat(tile): add eight by nine aspect ratio (#504)
Adds an eight by nine tile aspect ratio, which will be used in the image collage component in modern client.
1 parent 8d28645 commit 9c19e52

File tree

4 files changed

+20
-0
lines changed

4 files changed

+20
-0
lines changed
Loading

src/components/Tile/Tile.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,23 @@ const image = <Image source={yammerLogo} description={yammerLogoDescription} ful
3333

3434
<br />
3535

36+
<FixedGridRow>
37+
<FixedGridColumn>
38+
<Tile aspectRatio={TileAspectRatio.EightNine}>{image}</Tile>
39+
</FixedGridColumn>
40+
<FixedGridColumn>
41+
<Tile aspectRatio={TileAspectRatio.EightNine}>{image}</Tile>
42+
</FixedGridColumn>
43+
<FixedGridColumn>
44+
<Tile aspectRatio={TileAspectRatio.EightNine}>{image}</Tile>
45+
</FixedGridColumn>
46+
<FixedGridColumn>
47+
<Tile aspectRatio={TileAspectRatio.EightNine}>{image}</Tile>
48+
</FixedGridColumn>
49+
</FixedGridRow>
50+
51+
<br />
52+
3653
<FixedGridRow>
3754
<FixedGridColumn>
3855
<Tile aspectRatio={TileAspectRatio.OneOne}>{image}</Tile>

src/components/Tile/Tile.styles.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ export interface TileClassNameProps {
1212

1313
const mapAspectRatioToPercent: Record<TileAspectRatio, string> = {
1414
[TileAspectRatio.TwoThree]: '150%',
15+
[TileAspectRatio.EightNine]: '112.5%',
1516
[TileAspectRatio.OneOne]: '100%',
1617
[TileAspectRatio.FourThree]: '75%',
1718
[TileAspectRatio.SixteenNine]: '56.25%',

src/components/Tile/Tile.types.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ export enum TileAspectRatio {
1313
FourThree = '4_3',
1414
/** 1:1 aspect ratio */
1515
OneOne = '1_1',
16+
/** 8:9 aspect ratio */
17+
EightNine = '8_9',
1618
/** 2:3 aspect ratio */
1719
TwoThree = '2_3',
1820
}

0 commit comments

Comments
 (0)