Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add additional device options to addon-viewport #3918

Merged
merged 2 commits into from
Jul 25, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ describe('Viewport/Panel', () => {
});

it('passes the children', () => {
expect(select.props().children).toHaveLength(8);
expect(select.props().children).toHaveLength(15);
});

it('onChange it updates the viewport', () => {
Expand Down
56 changes: 56 additions & 0 deletions addons/viewport/src/shared/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,22 @@ export const INITIAL_VIEWPORTS = {
},
type: 'mobile',
},
iphone8p: {
name: 'iPhone 7 Plus',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You mean iPhone 8 Plus, right?

styles: {
height: '960px',
width: '540px',
},
type: 'mobile',
},
iphonex: {
name: 'iPhone X',
styles: {
height: '1218px',
width: '563px',
},
type: 'mobile',
},
ipad: {
name: 'iPad',
styles: {
Expand All @@ -48,6 +64,22 @@ export const INITIAL_VIEWPORTS = {
},
type: 'tablet',
},
ipad10p: {
name: 'iPad Pro 10.5-in',
styles: {
height: '1112px',
width: '834px',
},
type: 'tablet',
},
ipad12p: {
name: 'iPad Pro 12.9-in',
styles: {
height: '1366px',
width: '1024px',
},
type: 'tablet',
},
galaxys5: {
name: 'Galaxy S5',
styles: {
Expand All @@ -56,6 +88,14 @@ export const INITIAL_VIEWPORTS = {
},
type: 'mobile',
},
galaxys9: {
name: 'Galaxy S9',
styles: {
height: '1480px',
width: '720px',
},
type: 'mobile',
},
nexus5x: {
name: 'Nexus 5X',
styles: {
Expand All @@ -72,5 +112,21 @@ export const INITIAL_VIEWPORTS = {
},
type: 'mobile',
},
pixel: {
name: 'Pixel',
styles: {
height: '960px',
width: '540px',
},
type: 'mobile',
},
pixelxl: {
name: 'Pixel XL',
styles: {
height: '1280px',
width: '720px',
},
type: 'mobile',
},
};
export const DEFAULT_VIEWPORT = 'responsive';