Skip to content

Commit

Permalink
fix(AspectRatio): Accept 3x2 ratio prop type (#11276)
Browse files Browse the repository at this point in the history
* Accept 3x2 ratio prop type in AspectRatio

* fix: prettier

* fix(AspectRatio): add extra prop type to snapshot
  • Loading branch information
francinelucca authored Apr 25, 2022
1 parent f76dda9 commit 6b359e6
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
2 changes: 2 additions & 0 deletions packages/react/__tests__/__snapshots__/PublicAPI-test.js.snap
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ Map {
"1x2",
"4x3",
"3x4",
"3x2",
"2x3",
"1x1",
],
],
Expand Down
12 changes: 11 additions & 1 deletion packages/react/src/components/AspectRatio/AspectRatio.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,17 @@ AspectRatio.propTypes = {
* Specify the ratio to be used by the aspect ratio container. This will
* determine what aspect ratio your content will be displayed in.
*/
ratio: PropTypes.oneOf(['16x9', '9x16', '2x1', '1x2', '4x3', '3x4', '1x1']),
ratio: PropTypes.oneOf([
'16x9',
'9x16',
'2x1',
'1x2',
'4x3',
'3x4',
'3x2',
'2x3',
'1x1',
]),
};

export default AspectRatio;

0 comments on commit 6b359e6

Please sign in to comment.